lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080908114119.GH3189@amd.com>
Date:	Mon, 8 Sep 2008 13:41:19 +0200
From:	Joerg Roedel <joerg.roedel@....com>
To:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
CC:	mingo@...hat.com, linux-kernel@...r.kernel.org,
	iommu@...ts.linux-foundation.org
Subject: Re: [PATCH] x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu

On Sat, Sep 06, 2008 at 09:18:37PM +0900, FUJITA Tomonori wrote:
> On Fri, 5 Sep 2008 12:43:05 +0200
> Joerg Roedel <joerg.roedel@....com> wrote:
> 
> > On Fri, Sep 05, 2008 at 05:58:48PM +0900, FUJITA Tomonori wrote:
> > > Signed-off-by: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
> > > ---
> > >  arch/x86/kernel/pci-nommu.c |    3 +++
> > >  1 files changed, 3 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c
> > > index 526b2db..3495f88 100644
> > > --- a/arch/x86/kernel/pci-nommu.c
> > > +++ b/arch/x86/kernel/pci-nommu.c
> > > @@ -102,6 +102,9 @@ nommu_alloc_coherent(struct device *hwdev, size_t size,
> > >  	if (dma_mask == DMA_24BIT_MASK)
> > >  		gfp |= GFP_DMA;
> > >  again:
> > > +	if (gfp & GFP_DMA)
> > > +		gfp |= __GFP_NORETRY;
> > > +
> > 
> > Huh? Why that? The __GFP_NORETRY is a hint from the caller to the page
> > allocator on how aggressive it should try to allocate memory. I don't
> > think the DMA code should touch those flags unless there is a very very
> > good reason for it.
> 
> The current comment is reasonable for me:
> 
> /* Don't invoke OOM killer or retry in lower 16MB DMA zone */
> if (gfp & __GFP_DMA)
>      noretry = 1;

Ok, so please add a comment to this so we know in the future why this is
there.

Joerg

-- 
           |           AMD Saxony Limited Liability Company & Co. KG
 Operating |         Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System    |                  Register Court Dresden: HRA 4896
 Research  |              General Partner authorized to represent:
 Center    |             AMD Saxony LLC (Wilmington, Delaware, US)
           | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ