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: <54DD08BC.2020008@redhat.com>
Date:	Thu, 12 Feb 2015 15:10:36 -0500
From:	Rik van Riel <riel@...hat.com>
To:	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Hugh Dickins <hughd@...gle.com>
CC:	Dave Hansen <dave.hansen@...el.com>, Mel Gorman <mgorman@...e.de>,
	Vlastimil Babka <vbabka@...e.cz>,
	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>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCHv3 03/24] mm: avoid PG_locked on tail pages

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/12/2015 02:55 PM, Rik van Riel wrote:
> On 02/12/2015 11:18 AM, Kirill A. Shutemov wrote:

>> @@ -490,6 +493,7 @@ extern int 
>> wait_on_page_bit_killable_timeout(struct page *page,
> 
>> static inline int wait_on_page_locked_killable(struct page *page)
>>  { +	page = compound_head(page); if (PageLocked(page)) return 
>> wait_on_page_bit_killable(page, PG_locked); return 0; @@ -510,6 
>> +514,7 @@ static inline void wake_up_page(struct page *page, int 
>> bit) */ static inline void wait_on_page_locked(struct page *page)
>>  { +	page = compound_head(page); if (PageLocked(page)) 
>> wait_on_page_bit(page, PG_locked); }
> 
> These are all atomic operations.
> 
> This may be a stupid question with the answer lurking somewhere in
> the other patches, but how do you ensure you operate on the right
> page lock during a THP collapse or split?

Kirill answered that question on IRC.

The VM takes a refcount on a page before attempting to take a page
lock, which prevents the THP code from doing anything with the
page. In other words, while we have a refcount on the page, we
will dereference the same page lock.

- -- 
All rights reversed
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJU3Qi8AAoJEM553pKExN6D/44H/jUIn9btSRRIje/YBFFib8Dt
Zlvn4bFD6MbFonTQMJA5+vb6s0gxwdkbwLqGKpRo+FHWnKDxCvEpQfxuj708LaCq
1tqjnKIv1xt5bz31pV/UQhdAMcbcyKdEu4udH5mQigh4HIXYhUhe4w9TMUGu/f4U
FTx7dn3FfhQT3qWTVdZubdY/JRIXJcaXYqVIauvXQCRsCHfmx5YHD5YLulXP9OKw
HP0baxtbxP5njNPthbb9T947dcdndbBiwt3+Rnnlw4Ij4fB2kX7kvOC4M8v0eKKA
wKZ7A0sfzp27kJT7N/HlwGOXnX/e28LMbK7zA1avi5JDIIAYQU1Ris67EXTSKlg=
=1q7l
-----END PGP SIGNATURE-----
--
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