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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a781481a0706051405n5af19f2t52bd1760f216fd59@mail.gmail.com>
Date:	Wed, 6 Jun 2007 02:35:39 +0530
From:	"Satyam Sharma" <satyam.sharma@...il.com>
To:	"Robert P. J. Day" <rpjday@...dspring.com>
Cc:	"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
	schwidefsky@...ibm.com, "Andrew Morton" <akpm@...l.org>,
	linux-mm@...ck.org
Subject: Re: [PATCH] S390: Replace calls to __get_free_pages() with __get_dma_pages().

Hi,

On 6/6/07, Robert P. J. Day <rpjday@...dspring.com> wrote:
>
> Replace a number of calls to __get_free_pages() with the corresponding
> calls to __get_dma_pages().
> [...]
>   once the __GFP_DMA argument is removed, it does look weird to see
> the first argument of just 0.  should that be filled in with
> GFP_ATOMIC as christopher lameter suggested?

Yes, I suppose so ... GFP_ATOMIC can dip into the emergency
pools so would also make this code a bit more "robust" than using
"0" (== GFP_NOWAIT) and it's not that GFP_ATOMIC "waits" on
anything either ...

> -                       (void *)__get_free_pages(__GFP_DMA,
> +                       (void *)__get_dma_pages(0,

GFP_NOWAIT == 0, so the macro GFP_NOWAIT is the one to
use if you really don't want any change in behaviour (and as the
comment above GFP_NOWAIT says, it's much better to use that
name than simply specify "0").

Off-topic, but I wonder what are the valid usage cases / scenarios
for GFP_NOWAIT? The obvious answer is somebody might want to
be a way-too-polite citizen and stay off the emergency pools even
from atomic context, but why would anybody want to do /that/ ...
[ BTW there are 3 users of GFP_NOWAIT in kernel code, but there
could be more that simply specify "0" to get same behaviour. ]

Satyam
-
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