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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 2 Jun 2011 23:40:41 +0200
From:	Andrea Arcangeli <aarcange@...hat.com>
To:	Minchan Kim <minchan.kim@...il.com>
Cc:	Mel Gorman <mgorman@...e.de>, Mel Gorman <mel@....ul.ie>,
	akpm@...ux-foundation.org, Ury Stankevich <urykhy@...il.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] mm: compaction: Abort compaction if too many pages are
 isolated and caller is asynchronous

Hello Minchan,

On Fri, Jun 03, 2011 at 05:21:56AM +0900, Minchan Kim wrote:
> Isn't it rather aggressive?
> I think cursor page is likely to be PageTail rather than PageHead.
> Could we handle it simply with below code?

It's not so likely, there is small percentage of compound pages that
aren't THP compared to the rest that is either regular pagecache or
anon regular or anon THP or regular shm. If it's THP chances are we
isolated the head and it's useless to insist on more tail pages (at
least for large page size like on x86). Plus we've compaction so
insisting and screwing lru ordering isn't worth it, better to be
permissive and abort... in fact I wouldn't dislike to remove the
entire lumpy logic when COMPACTION_BUILD is true, but that alters the
trace too...

> get_page(cursor_page)
> /* The page is freed already */
> if (1 == page_count(cursor_page)) {
> 	put_page(cursor_page)
> 	continue;
> }
> put_page(cursor_page);

We can't call get_page on an tail page or we break split_huge_page,
only an isolated lru can be boosted, if we take the lru_lock and we
check the page is in lru, then we can isolate and pin it safely.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ