From: Tony Battersby <tonyb@cybernetics.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>,
Christoph Hellwig <hch@lst.de>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Sathya Prakash <sathya.prakash@broadcom.com>,
Chaitra P B <chaitra.basappa@broadcom.com>,
Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>,
iommu@lists.linux-foundation.org, linux-mm <linux-mm@kvack.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
MPT-FusionLinux.pdl@broadcom.com
Subject: Re: [PATCH 2/3] dmapool: improve scalability of dma_pool_free
Date: Fri, 27 Jul 2018 18:07:00 -0400 [thread overview]
Message-ID: <dd582095-c8f8-3103-ccd8-37bea89e7e1a@cybernetics.com> (raw)
In-Reply-To: <CAHp75VcjMg2RABg4F3u=wpgQvGK8qr-4wxeRNmJtfMAE2VRRAw@mail.gmail.com>
On 07/27/2018 05:35 PM, Andy Shevchenko wrote:
> On Sat, Jul 28, 2018 at 12:27 AM, Tony Battersby <tonyb@cybernetics.com> wrote:
>> On 07/27/2018 03:38 PM, Tony Battersby wrote:
>>> But the bigger problem is that my first patch adds another list_head to
>>> the dma_page for the avail_page_link to make allocations faster. I
>>> suppose we could make the lists singly-linked instead of doubly-linked
>>> to save space.
>>>
>> I managed to redo my dma_pool_alloc() patch to make avail_page_list
>> singly-linked instead of doubly-linked.
> Are you relying on llist.h implementation?
>
> Btw, did you see quicklist.h?
>
>
I looked over include/linux/*list* to see if there was a suitable
implementation I could use.A llist.h makes a big deal about having a
lock-less implementation with atomic instructions, which seemed like
overkill.A I didn't see anything else suitable, so I just went with my
own implementation.A Singly-linked lists are simple enough.A And a quick
"grep -i singly include/linux/*" shows precedent in bi_next, fl_next,
fa_next, etc.
Thanks for pointing out quicklist.h.A At first I thought you were
confused since you were talking about linked list implementations and
quicklist.h sounds like a linked list implementation but isn't.A But now
I see that it is doing simple memory allocation/free, so that is the
relevance to dmapool.A Incidentally it looks like it is also using a
singly-linked list to store the list of free pages, but it is much
simpler because it doesn't try to sub-divide the pages into smaller
allocations.
next prev parent reply other threads:[~2018-07-27 22:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-26 18:54 Tony Battersby
2018-07-26 19:42 ` Matthew Wilcox
2018-07-26 20:06 ` Tony Battersby
2018-07-27 0:07 ` Matthew Wilcox
2018-07-27 13:23 ` Tony Battersby
2018-07-27 15:23 ` Matthew Wilcox
2018-07-27 19:38 ` Tony Battersby
2018-07-27 21:27 ` Tony Battersby
2018-07-27 21:35 ` Andy Shevchenko
2018-07-27 22:07 ` Tony Battersby [this message]
2018-07-30 14:05 ` Tony Battersby
2018-07-26 19:45 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dd582095-c8f8-3103-ccd8-37bea89e7e1a@cybernetics.com \
--to=tonyb@cybernetics.com \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=andy.shevchenko@gmail.com \
--cc=chaitra.basappa@broadcom.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=linux-scsi@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=sathya.prakash@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox