From: Andrew Morton <akpm@osdl.org>
To: Hugh Dickins <hugh@veritas.com>
Cc: wli@holomorphy.com, nickpiggin@yahoo.com.au,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] compound page: use page[1].lru
Date: Sun, 12 Feb 2006 13:54:57 -0800 [thread overview]
Message-ID: <20060212135457.2a3d3b37.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0602121943150.15774@goblin.wat.veritas.com>
Hugh Dickins <hugh@veritas.com> wrote:
>
> If a compound page has its own put_page_testzero destructor (the only
> current example is free_huge_page), that is noted in page[1].mapping of
> the compound page. But that's rather a poor place to keep it: functions
> which call set_page_dirty_lock after get_user_pages (e.g. Infiniband's
> __ib_umem_release) ought to be checking first, otherwise set_page_dirty
> is liable to crash on what's not the address of a struct address_space.
>
> And now I'm about to make that worse: it turns out that every compound
> page needs a destructor, so we can no longer rely on hugetlb pages going
> their own special way, to avoid further problems of page->mapping reuse.
> For example, not many people know that: on 50% of i386 -Os builds, the
> first tail page of a compound page purports to be PageAnon (when its
> destructor has an odd address), which surprises page_add_file_rmap.
>
> Keep the compound page destructor in page[1].lru.next instead. And to
> free up the common pairing of mapping and index, also move compound page
> order from index to lru.prev. Slab reuses page->lru too: but if we ever
> need slab to use compound pages, it can easily stack its use above this.
I'm scratching my head over flush_dcache_page() on, say, sparc64. For
example, the one in fs/direct-io.c. With this patch, we'll call
flush_dcache_page_impl(), which at least won't crash. Before the patch I
think we'd just do random stuff.
But I'm not sure that flush_dcache_page(hugetlb tail page) will do the
right thing in aither case?
next prev parent reply other threads:[~2006-02-12 21:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-12 19:46 Hugh Dickins
2006-02-12 19:47 ` [PATCH 2/3] compound page: default destructor Hugh Dickins
2006-02-12 19:50 ` [PATCH 3/3] compound page: no access_process_vm check Hugh Dickins
2006-02-12 21:54 ` Andrew Morton [this message]
2006-02-13 0:57 ` [PATCH 1/3] compound page: use page[1].lru Hugh Dickins
2006-02-13 2:13 ` Andrew Morton
2006-02-13 7:05 ` David S. Miller
2006-02-13 7:12 ` Andrew Morton
2006-02-13 7:59 ` David S. Miller
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=20060212135457.2a3d3b37.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=wli@holomorphy.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
all inboxes | Powered by JetHome®