Re: [RFC][PATCH] page->mapping clarification [1/3] base functions

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...>
Cc: Christoph Lameter <clameter@...>, LKML <linux-kernel@...>, linux-mm@kvack.org <linux-mm@...>, Andrew Morton <akpm@...>, nickpiggin@yahoo.com.au <nickpiggin@...>, <ricknu-0@...>, Magnus Damm <magnus.damm@...>
Date: Friday, September 21, 2007 - 1:02 pm

On Fri, 21 Sep 2007, KAMEZAWA Hiroyuki wrote:

My own vote (nothing more) would be for you to set this aside until
some future time when there aren't a dozen developers all trampling
over each other in this area.

They're invasive little changes affecting all filesystems, whereas what
we've done so far with page->mapping hasn't affected filesystems at all.

Purposes 1 and 2 don't score very high in my book (though I too regret
how mm/migrate.c copied that PAGE_MAPPING_ANON stuff from it's rightful
home in mm/rmap.c: maybe we should wrap that).  There's no end to the
wrappers we can add, but they're not always helpful.

3: well, saving memory is good, but I think it could wait until some
other time, particularly since the memory controller isn't in yet.

Wouldn't it be easier to do something with page->lru than page->mapping?
Everybody is interested in page->mapping, not so many in page->lru.
(Though perhaps it wouldn't work out so well, since you don't need to
get uniquely from mapping to page, whereas you do from lru to page.)

If we were to attack page->mapping to save memory from struct page,
then we should consider Magnus Damm's idea too: he suggested it could
be replaced by a pointer to the radixtree slot (something else needed
in the anon case), from which "index" could be deduced via alignment
instead of keeping it in struct page (details to be filled in ...)

Of course, my particular prejudice is that I promised months ago to
free up the PG_swapcache bit by using a PAGE_MAPPING_SWAP bit instead.
That patch got buried while I tried to think up a suitable name for
a further page_mapping() variant that turned out to be needed - guess
I should look through your collection to see if I can steal one ;)
Beyond the unsatisfactory naming, that work has been long done
(and like PAGE_MAPPING_ANON, doesn't touch filesystems at all).

Or should I now leave PG_swapcache as is,
given your designs on page->mapping?

Hugh

p.s. Sorry to niggle, but next time, please say [PATCH 1/3] etc.
rather than [PATCH] Long Description [1/3], so it's easier to
sort the mail subjects by eye in limited columns - thanks.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC][PATCH] page-&gt;mapping clarification [1/3] base f..., KAMEZAWA Hiroyuki, (Fri Sep 21, 11:06 am)
Re: [RFC][PATCH] page-&gt;mapping clarification [1/3] base f..., Christoph Lameter, (Thu Sep 20, 2:26 pm)
Re: [RFC][PATCH] page-&gt;mapping clarification [1/3] base f..., KAMEZAWA Hiroyuki, (Thu Sep 20, 8:50 pm)
Re: [RFC][PATCH] page->mapping clarification [1/3] base f..., Hugh Dickins, (Fri Sep 21, 1:02 pm)
Re: [RFC][PATCH] page-&gt;mapping clarification [1/3] base f..., KAMEZAWA Hiroyuki, (Fri Sep 21, 2:42 pm)
Re: [RFC][PATCH] page-&gt;mapping clarification [1/3] base f..., KAMEZAWA Hiroyuki, (Wed Sep 26, 5:50 pm)
[RFC][PATCH] page-&gt;mapping clarification [3/3] changes in..., KAMEZAWA Hiroyuki, (Wed Sep 19, 3:46 am)