mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "rae l" <crquan@gmail.com>
To: "Andrew Morton" <akpm@linux-foundation.org>
Cc: "Robert P. J. Day" <rpjday@mindspring.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] lib: Replace calls to __get_free_pages() with __get_dma_pages().
Date: Wed, 6 Jun 2007 15:34:27 +0800	[thread overview]
Message-ID: <91b13c310706060034g122e2d02oafb8a477bfc8f101@mail.gmail.com> (raw)
In-Reply-To: <20070605170601.67bc2939.akpm@linux-foundation.org>

On 6/6/07, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Tue, 5 Jun 2007 16:58:57 -0400 (EDT)
> "Robert P. J. Day" <rpjday@mindspring.com> wrote:
>
> > Replace a couple calls to __get_free_pages() with the corresponding
> > calls to __get_dma_pages().
> >
> > Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
> >
> > ---
> >
> >   that's the lot of them.
> >
> > diff --git a/lib/swiotlb.c b/lib/swiotlb.c
> > index 10c13ad..8fc38dc 100644
> > --- a/lib/swiotlb.c
> > +++ b/lib/swiotlb.c
> > @@ -201,8 +201,7 @@ swiotlb_late_init_with_default_size(size_t default_size)
> >       bytes = io_tlb_nslabs << IO_TLB_SHIFT;
> >
> >       while ((SLABS_PER_PAGE << order) > IO_TLB_MIN_SLABS) {
> > -             io_tlb_start = (char *)__get_free_pages(GFP_DMA | __GFP_NOWARN,
> > -                                                     order);
> > +             io_tlb_start = (char *)__get_dma_pages(__GFP_NOWARN, order);
>
> __get_dma_pages() is just pointless obfuscation.  I think it'd be better to
> go the other way: open-code the GFP_DMA at all callsites then send
> __get_dma_pages() bitbucketwards.
thus __get_free_pages(GFP_DMA ...) can do better, I don't think
__get_dma_pages is needed.

-- 
Denis Cheng
Linux Application Developer

  parent reply	other threads:[~2007-06-06  7:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-05 20:58 Robert P. J. Day
2007-06-06  0:06 ` Andrew Morton
2007-06-06  7:18   ` Robert P. J. Day
2007-06-06  7:34   ` rae l [this message]
2007-06-06  7:56   ` Robert P. J. Day
2007-06-06  8:24     ` Peter Zijlstra
2007-06-07  7:47       ` Robert P. J. Day

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=91b13c310706060034g122e2d02oafb8a477bfc8f101@mail.gmail.com \
    --to=crquan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpjday@mindspring.com \
    /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

all inboxes | Powered by JetHome®