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] [day] [month] [year] [list]
Message-ID: <1346799259.13492.272.camel@schen9-DESK>
Date:	Tue, 04 Sep 2012 15:54:19 -0700
From:	Tim Chen <tim.c.chen@...ux.intel.com>
To:	Matthew Wilcox <willy@...ux.intel.com>
Cc:	Mel Gorman <mel@....ul.ie>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Minchan Kim <minchan@...nel.org>,
	Johannes Weiner <hannes@...xchg.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Andi Kleen <ak@...ux.intel.com>, linux-mm@...ck.org,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Alex Shi <alex.shi@...el.com>
Subject: Re: [RFC PATCH 2/2] mm: Batch page_check_references in
 shrink_page_list sharing the same i_mmap_mutex

On Tue, 2012-09-04 at 08:21 -0700, Tim Chen wrote:
> On Tue, 2012-08-21 at 17:48 -0700, Tim Chen wrote:
> 
> > 
> > Thanks to Matthew's suggestions on improving the patch. Here's the
> > updated version.  It seems to be sane when I booted my machine up.  I
> > will put it through more testing when I get a chance.
> > 
> > Tim
> > 
> 
> Matthew,
> 
> The new patch seems to be causing some of the workloads with mmaped file
> read to seg fault.  Will need to dig further to find out why.
> 
> Tim
> 

Okay, the problem seems to be the code below.  It is too restrictive and
causes some cases where the mutex needs to be taken in try_to_unmap_file
to be missed.

> > +int needs_page_mmap_mutex(struct page *page)
> > +{
> > +	return page->mapping && page_mapped(page) && page_rmapping(page) &&
> > +		!PageKsm(page) && !PageAnon(page);
> > +}
> > +

Changing the check to the following fixes the problem:

@@ -873,8 +873,7 @@ static int page_referenced_file(struct page *page,
 
 int needs_page_mmap_mutex(struct page *page)
 {
-       return page->mapping && page_mapped(page) && page_rmapping(page) &&
-               !PageKsm(page) && !PageAnon(page);
+       return page->mapping && !PageKsm(page) && !PageAnon(page);
 }

I'll do more testing and generate a second version of the patch set with the fixes.

Tim



--
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