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]
Message-ID: <20150515134103.GC6625@node.dhcp.inet.fi>
Date:	Fri, 15 May 2015 16:41:03 +0300
From:	"Kirill A. Shutemov" <kirill@...temov.name>
To:	Vlastimil Babka <vbabka@...e.cz>
Cc:	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Hugh Dickins <hughd@...gle.com>,
	Dave Hansen <dave.hansen@...el.com>,
	Mel Gorman <mgorman@...e.de>, Rik van Riel <riel@...hat.com>,
	Christoph Lameter <cl@...two.org>,
	Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
	Steve Capper <steve.capper@...aro.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Michal Hocko <mhocko@...e.cz>,
	Jerome Marchand <jmarchan@...hat.com>,
	Sasha Levin <sasha.levin@...cle.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCHv5 07/28] thp, mlock: do not allow huge pages in mlocked
 area

On Fri, May 15, 2015 at 02:56:42PM +0200, Vlastimil Babka wrote:
> On 04/23/2015 11:03 PM, Kirill A. Shutemov wrote:
> >With new refcounting THP can belong to several VMAs. This makes tricky
> >to track THP pages, when they partially mlocked. It can lead to leaking
> >mlocked pages to non-VM_LOCKED vmas and other problems.
> >
> >With this patch we will split all pages on mlock and avoid
> >fault-in/collapse new THP in VM_LOCKED vmas.
> >
> >I've tried alternative approach: do not mark THP pages mlocked and keep
> >them on normal LRUs. This way vmscan could try to split huge pages on
> >memory pressure and free up subpages which doesn't belong to VM_LOCKED
> >vmas.  But this is user-visible change: we screw up Mlocked accouting
> >reported in meminfo, so I had to leave this approach aside.
> >
> >We can bring something better later, but this should be good enough for
> >now.
> 
> I can imagine people won't be happy about losing benefits of THP's when they
> mlock().
> How difficult would it be to support mlocked THP pages without splitting
> until something actually tries to do a partial (un)mapping, and only then do
> the split? That will support the most common case, no?

Yes, it will.

But what will we do if we fail to split huge page on munmap()? Fail
munmap() with -EBUSY? 

-- 
 Kirill A. Shutemov
--
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