From: Andrew Morton <akpm@linux-foundation•org>
To: Timur Tabi <timur@freescale•com>
Cc: linux-fbdev-devel@lists•sourceforge.net, a.p.zijlstra@chello•nl,
linux-kernel@vger•kernel.org, linuxppc-dev@ozlabs•org,
yorksun@freescale•com
Subject: Re: [PATCH 1/2 v2] Driver for Freescale 8610 and 5121 DIU
Date: Mon, 24 Mar 2008 11:47:40 -0700 [thread overview]
Message-ID: <20080324114740.337509d3.akpm@linux-foundation.org> (raw)
In-Reply-To: <47E7C05C.2000001@freescale.com>
On Mon, 24 Mar 2008 09:53:16 -0500
Timur Tabi <timur@freescale•com> wrote:
> Andrew Morton wrote:
>
> >>> GFP_DMA implies GFP_ATOMIC, but it's appropriate for documentation purposes.
> >> So does that mean that "GFP_DMA | GFP_KERNEL" is always wrong?
> >
> > No, that's OK too. It's just that GFP_DMA|GFP_ATOMIC is a bit redundant
> > and misleading. GFP_DMA is already atomic; the only effect of adding
> > GFP_ATOMIC to GFP_DMA is to add __GFP_HIGH.
> >
> > Don't wory about it ;)
>
> Well, maybe we don't want GFP_ATOMIC then, because I don't think we want
> __GFP_HIGH. Looking at the code, it appears the __GFP_HIGH has nothing to do
> with HIGHMEM (which on PowerPC is the not 1-to-1 mapping memory from 0xF000000
> to 0xFFFFFFFF). Further examination of the cools shows the __GFP_HIGH says to
> try access the "emergency pool", and I see this code snippet:
>
> if (alloc_flags & ALLOC_HIGH)
> min -= min / 2;
>
> I guess this means that we reduce the amount of memory that can be available in
> order for the allocate to succeed.
>
> Considering that the amount of memory that we allocate is in the order of
> megabytes, and it really isn't that important, I would think that we don't want
> to touch the emergency pool. Does that sound right?
yup. The absence of __GFP_WAIT already causes the page allocator to try a
bit harder. Adding __GFP_HIGH would make it try harder still.
You do need to be sure that the driver will robustly and correctly recover
from an allocation failure here.
prev parent reply other threads:[~2008-03-24 18:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-19 18:50 v2 patch for Freescale DIU driver York Sun
2008-03-19 18:50 ` [PATCH 1/2 v2] Driver for Freescale 8610 and 5121 DIU York Sun
2008-03-19 18:50 ` [PATCH 2/2 v2] Add DIU platform code for MPC8610HPCD York Sun
2008-03-20 22:33 ` Andrew Morton
2008-03-25 12:43 ` Andy Whitcroft
2008-03-25 19:18 ` Andrew Morton
2008-03-20 22:27 ` [PATCH 1/2 v2] Driver for Freescale 8610 and 5121 DIU Andrew Morton
2008-03-20 23:02 ` Peter Zijlstra
2008-03-21 16:12 ` Timur Tabi
2008-03-21 18:12 ` Andrew Morton
2008-03-24 14:53 ` Timur Tabi
2008-03-24 18:47 ` Andrew Morton [this message]
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=20080324114740.337509d3.akpm@linux-foundation.org \
--to=akpm@linux-foundation$(echo .)org \
--cc=a.p.zijlstra@chello$(echo .)nl \
--cc=linux-fbdev-devel@lists$(echo .)sourceforge.net \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=timur@freescale$(echo .)com \
--cc=yorksun@freescale$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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