lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 14 Aug 2012 22:52:27 +0300 From: "Michael S. Tsirkin" <mst@...hat.com> To: Rafael Aquini <aquini@...hat.com> Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, virtualization@...ts.linux-foundation.org, Rusty Russell <rusty@...tcorp.com.au>, Rik van Riel <riel@...hat.com>, Mel Gorman <mel@....ul.ie>, Andi Kleen <andi@...stfloor.org>, Andrew Morton <akpm@...ux-foundation.org>, Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>, Minchan Kim <minchan@...nel.org> Subject: Re: [PATCH v7 1/4] mm: introduce compaction and migration for virtio ballooned pages On Tue, Aug 14, 2012 at 02:44:05PM -0300, Rafael Aquini wrote: > On Mon, Aug 13, 2012 at 11:26:19AM +0300, Michael S. Tsirkin wrote: > > > +static inline bool movable_balloon_page(struct page *page) > > > +{ > > > + return (page->mapping && page->mapping == balloon_mapping); > > > > I am guessing this needs smp_read_barrier_depends, and maybe > > ACCESS_ONCE ... > > > > I'm curious about your guessing here. Could you ellaborate it further, please? well balloon_mapping can change dynamically. I think actually rcu is a good fit here. > > > > +#else > > > +static inline bool isolate_balloon_page(struct page *page) { return false; } > > > +static inline void putback_balloon_page(struct page *page) { return false; } > > > +static inline bool movable_balloon_page(struct page *page) { return false; } > > > +#endif /* (VIRTIO_BALLOON || VIRTIO_BALLOON_MODULE) && CONFIG_COMPACTION */ > > > + > > > > This does mean that only one type of balloon is useable at a time. > > I wonder whether using a flag in address_space structure instead > > is possible ... > > This means we are only introducing this feature for virtio_balloon by now. > Despite the flagging address_space stuff is something we surely can look in the > future, I quite didn't get how we could be using two different types of balloon > devices at the same time for the same system. Could you ellaborate it a little > more, please? > > > > > +/* __isolate_lru_page() counterpart for a ballooned page */ > > > +bool isolate_balloon_page(struct page *page) > > > +{ > > > + if (WARN_ON(!movable_balloon_page(page))) > > > > Looks like this actually can happen if the page is leaked > > between previous movable_balloon_page and here. > > > > > + return false; > > Yes, it surely can happen, and it does not harm to catch it here, print a warn and > return. While testing it, I wasn't lucky to see this small window opening, though. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists