From: Christoph Lameter <clameter@sgi.com>
To: akpm@linux-foundation.orgAndrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, thomas.jarosch@intra2net.com
Subject: Re: [patch 1/1] alloc_pages(): permit get_zeroed_page(GFP_ATOMIC) from interrupt context
Date: Mon, 27 Aug 2007 13:13:16 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0708271308380.5457@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <200708232107.l7NL7XDt026979@imap1.linux-foundation.org>
On Thu, 23 Aug 2007, akpm@linux-foundation.org wrote:
> See http://bugzilla.kernel.org/show_bug.cgi?id=8928
>
> I think it makes sense to permit a non-BUGging get_zeroed_page(GFP_ATOMIC)
> from interrupt context.
AFAIK this works now. GFP_ATOMIC does not set __GFP_HIGHMEM and thus the
check
VM_BUG_ON((gfp_flags & __GFP_HIGHMEM) && in_interrupt());
does not trigger
Any use of get_zeroed_page( | __GFP_HIGHMEM) will cause a bug in
fastcall unsigned long get_zeroed_page(gfp_t gfp_mask)
{
struct page * page;
/*
* get_zeroed_page() returns a 32-bit address, which cannot represent
* a highmem page
*/
VM_BUG_ON((gfp_mask & __GFP_HIGHMEM) != 0);
page = alloc_pages(gfp_mask | __GFP_ZERO, 0);
if (page)
return (unsigned long) page_address(page);
return 0;
}
And the patch does not change anything. We currently BUG_ON(GFP_HIGHMEM &&
in_interrupt) and after this patch we will still BUG(). The check was
reordered but checks the same things. We could clear __GFP_HIGHMEM in
__alloc_pages() if we are in an interrupt?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-08-27 20:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-23 21:07 akpm, Andrew Morton
2007-08-27 20:13 ` Christoph Lameter [this message]
2007-08-27 20:33 ` Andrew Morton
2007-08-27 21:00 ` Christoph Lameter
2007-08-27 21:04 ` Andrew Morton
2007-08-27 21:20 ` Christoph Lameter
2007-08-27 21:32 ` Christoph Lameter
2007-08-27 21:34 ` Andrew Morton
2007-08-27 21:43 ` Christoph Lameter
2007-08-27 22:11 ` Andrew Morton
2007-08-27 22:12 ` Christoph Lameter
2007-08-27 22:45 ` Andrew Morton
2007-08-27 23:01 ` Christoph Lameter
2007-08-27 23:40 ` Andrew Morton
2007-08-27 23:48 ` Christoph Lameter
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=Pine.LNX.4.64.0708271308380.5457@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=akpm@linux-foundation.orgAndrew \
--cc=linux-mm@kvack.org \
--cc=thomas.jarosch@intra2net.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