Re: [PATCH -mm 04/25] free swap space on swap-in/activation

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: <linux-kernel@...>, <lee.schermerhorn@...>, <kosaki.motohiro@...>, <minchan.kim@...>, Hugh Dickins <hugh@...>
Date: Saturday, June 7, 2008 - 3:56 pm

On Fri, 6 Jun 2008 18:04:30 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:

I do not know if 50% is optimum.  It is just what the upstream kernel
has had since 2.4.10 or so.  Before that it used to be 75%.  This same
percentage is used to free swap spaces at swapin time.
 

I wonder if we wouldn't be off best simply placing the two on their
own cache line.  After all, they are often handled together.

I believe that should be a separate patch though, since I am not
changing that situation from what is already upstream and this
patch series contains more than enough stuff already.


With CONFIG_SWAP=n the macro PageSwapCache(page) will always be
declared false due to the declarations in page-flags.h.  That
means that vm_swap_full() will be evaluated and the compiler
should leave it out.

#ifdef CONFIG_SWAP
PAGEFLAG(SwapCache, swapcache)
#else
PAGEFLAG_FALSE(SwapCache)
#endif



It is safe because the callers already hold an extra reference to
each page.  I have added a full kerneldoc comment to this function
to explain that.

-- 
All rights reversed.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH -mm 04/25] free swap space on swap-in/activation, Rik van Riel, (Sat Jun 7, 3:56 pm)