From: Hugh Dickins <hugh@veritas.com>
To: Dominik Brodowski <linux@dominikbrodowski.net>,
Benoit Boissinot <benoit.boissinot@ens-lyon.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Michael Krufky <mkrufky@m1k.net>
Cc: Andrew Morton <akpm@osdl.org>,
Nick Piggin <nickpiggin@yahoo.com.au>,
Marc Koschewski <marc@osknowledge.org>,
linux-kernel@vger.kernel.org
Subject: Re: 2.6.15-rc1-mm2 0x414 Bad page states
Date: Sat, 19 Nov 2005 19:57:02 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.61.0511191950100.2846@goblin.wat.veritas.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0511182214200.4797@goblin.wat.veritas.com>
On Fri, 18 Nov 2005, Hugh Dickins wrote:
>
> Thanks for the info you've sent so far, implicating
> snd_pcm_mmap_data_nopage. But I've still not got it. Will resume
> tomorrow. If you can, would you please each send me your .config
> and your full startup dmesg (in case they help to focus me on which
> paths to look down in sound). You needn't spam akpm or lkml with them.
And thanks for the further info you sent, which allowed me to rebuild my
kernel to reproduce the problem easily with artsd. Though the answer was
staring me in the face from the first info you sent (and did occasionally
flit through my mind without being properly swatted), even in my Subject
line above: why were the page flags 0x414 instead of 0x4414 i.e. what had
happened to the PageCompound flag which I thought one of my patches was
adding?
Whoops, I'd completely missed that now we have to pass __GFP_COMP to
turn on that behaviour, because there are or were a few other places
which get confused by compound page behaviour. There's an excellent,
illuminating, prescient comment on compound pages by Andrew in
ChangeLog-2.6.6: but though he there foresees sound DMA buffers needing
it, I've a suspicion that DRM and some others might also be needing it.
So I'll go on a trawl through the source before finalizing the fix,
but below is the patch you guys need. Does this patch deal with your
Bad page states too, Marc? Does it help your mouse at all somehow?
Hugh
--- 2.6.15-rc1-mm2/sound/core/memalloc.c 2005-11-12 09:01:28.000000000 +0000
+++ linux/sound/core/memalloc.c 2005-11-19 19:03:32.000000000 +0000
@@ -197,6 +197,7 @@ void *snd_malloc_pages(size_t size, gfp_
snd_assert(size > 0, return NULL);
snd_assert(gfp_flags != 0, return NULL);
+ gfp_flags |= __GFP_COMP; /* compound page lets parts be mapped */
pg = get_order(size);
if ((res = (void *) __get_free_pages(gfp_flags, pg)) != NULL) {
mark_pages(virt_to_page(res), pg);
@@ -241,6 +242,7 @@ static void *snd_malloc_dev_pages(struct
snd_assert(dma != NULL, return NULL);
pg = get_order(size);
gfp_flags = GFP_KERNEL
+ | __GFP_COMP /* compound page lets parts be mapped */
| __GFP_NORETRY /* don't trigger OOM-killer */
| __GFP_NOWARN; /* no stack trace print - this call is non-critical */
res = dma_alloc_coherent(dev, PAGE_SIZE << pg, dma, gfp_flags);
next prev parent reply other threads:[~2005-11-19 19:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-18 19:15 Hugh Dickins
2005-11-18 20:12 ` Dominik Brodowski
2005-11-18 20:42 ` Rafael J. Wysocki
2005-11-19 4:30 ` Nick Piggin
2005-11-19 4:33 ` Nick Piggin
[not found] ` <Pine.LNX.4.61.0511182214200.4797@goblin.wat.veritas.com>
2005-11-19 19:57 ` Hugh Dickins [this message]
2005-11-19 22:42 ` Dominik Brodowski
2005-11-20 10:14 ` Marc Koschewski
2005-11-21 13:02 ` Christian Kujau
[not found] ` <20051122211625.165F114CB@hornet.berlios.de>
2005-11-22 21:32 ` Hugh Dickins
[not found] ` <20051122231603.2209814DA@hornet.berlios.de>
2005-11-23 11:07 ` Dave Airlie
2005-11-23 20:33 ` Hugh Dickins
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.61.0511191950100.2846@goblin.wat.veritas.com \
--to=hugh@veritas.com \
--cc=akpm@osdl.org \
--cc=benoit.boissinot@ens-lyon.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=marc@osknowledge.org \
--cc=mkrufky@m1k.net \
--cc=nickpiggin@yahoo.com.au \
--cc=rjw@sisk.pl \
/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®