Re: [PATCH 35 of 41] don't leave orhpaned swap cache after ksm merging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 26 Mar 2010, Andrea Arcangeli wrote:
> On Fri, Mar 26, 2010 at 01:16:40PM -0400, Rik van Riel wrote:
> > On 03/26/2010 01:00 PM, Andrea Arcangeli wrote:
> > > From: Andrea Arcangeli<aarcange@xxxxxxxxxx>
> > >
> > > When swapcache is replaced by a ksm page don't leave orhpaned swap cache.
> > 
> > Why is this part of the hugepage series?
> 
> This is a not relevant for hugepages. There's another ksm change so I
> thought I could sneak it in. It's still separated so it can be pulled
> off separately as needed.

It's a nice little catch, but you certainly shouldn't have buried it
amidst 40 other patches unrelated to it!

I was going to ack that patch and urge you to forward it to Andrew
separately, but did you test whether it works?  Isn't it actually a
no-op?  Because KSM is holding page lock across replace_page() (maybe
that's something I added after you were last there - at the time I did
it just from instinct, and to make a block look prettier; but later I
believe it turned out to be necessary), and free_swap_cache() only
works if trylock_page() succeeds.

So if we want the fix, I think it would have to be reworked, perhaps
slightly messier.

Something needed for -stable?  No, I think not, it's a situation that
gradually increases memory pressure, and then memory pressure frees it
(vmscan.c's __delete_from_swap_cache); it never prevents swapoff.

But it would be nice to fix it all the same: thanks for spotting.

Hugh

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]