Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753438AbbGaPBN (ORCPT ); Fri, 31 Jul 2015 11:01:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47084 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753069AbbGaPBM (ORCPT ); Fri, 31 Jul 2015 11:01:12 -0400 Message-ID: <55BB8DB2.9010804@redhat.com> Date: Fri, 31 Jul 2015 17:01:06 +0200 From: Jerome Marchand User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Kirill A. Shutemov" , Andrew Morton , Andrea Arcangeli , Hugh Dickins CC: Dave Hansen , Mel Gorman , Rik van Riel , Vlastimil Babka , Christoph Lameter , Naoya Horiguchi , Steve Capper , "Aneesh Kumar K.V" , Johannes Weiner , Michal Hocko , Sasha Levin , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv9 25/36] mm, thp: remove infrastructure for handling splitting PMDs References: <1437402069-105900-1-git-send-email-kirill.shutemov@linux.intel.com> <1437402069-105900-26-git-send-email-kirill.shutemov@linux.intel.com> In-Reply-To: <1437402069-105900-26-git-send-email-kirill.shutemov@linux.intel.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jCnAjDinooNRbjf9lMCdIgBHUl6rEm5Ov" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3139 Lines: 93 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jCnAjDinooNRbjf9lMCdIgBHUl6rEm5Ov Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 07/20/2015 04:20 PM, Kirill A. Shutemov wrote: > With new refcounting we don't need to mark PMDs splitting. Let's drop c= ode > to handle this. >=20 > Signed-off-by: Kirill A. Shutemov > Tested-by: Sasha Levin > Tested-by: Aneesh Kumar K.V > Acked-by: Vlastimil Babka > --- > fs/proc/task_mmu.c | 8 +++--- > include/asm-generic/pgtable.h | 9 ------- > include/linux/huge_mm.h | 21 +++++---------- > mm/gup.c | 12 +-------- > mm/huge_memory.c | 60 ++++++++++-------------------------= -------- > mm/memcontrol.c | 13 ++-------- > mm/memory.c | 18 ++----------- > mm/mincore.c | 2 +- > mm/mremap.c | 15 +++++------ > mm/pgtable-generic.c | 14 ---------- > mm/rmap.c | 4 +-- > 11 files changed, 37 insertions(+), 139 deletions(-) >=20 snip > @@ -1616,23 +1605,14 @@ int change_huge_pmd(struct vm_area_struct *vma,= pmd_t *pmd, > * Note that if it returns 1, this routine returns without unlocking p= age > * table locks. So callers must unlock them. > */ The comment above should be updated. It otherwise looks good. Acked-by: Jerome Marchand > -int __pmd_trans_huge_lock(pmd_t *pmd, struct vm_area_struct *vma, > +bool __pmd_trans_huge_lock(pmd_t *pmd, struct vm_area_struct *vma, > spinlock_t **ptl) > { > *ptl =3D pmd_lock(vma->vm_mm, pmd); > - if (likely(pmd_trans_huge(*pmd))) { > - if (unlikely(pmd_trans_splitting(*pmd))) { > - spin_unlock(*ptl); > - wait_split_huge_page(vma->anon_vma, pmd); > - return -1; > - } else { > - /* Thp mapped by 'pmd' is stable, so we can > - * handle it as it is. */ > - return 1; > - } > - } > + if (likely(pmd_trans_huge(*pmd))) > + return true; > spin_unlock(*ptl); > - return 0; > + return false; > } > =20 > /* --jCnAjDinooNRbjf9lMCdIgBHUl6rEm5Ov Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVu42yAAoJEHTzHJCtsuoCzGIH+wadxSCDKCQJdTtfDGkZ/etf LcKAt9ovQoNpUoSh+IdSKXOt3zYdkZN/49VVTkD8du7DjL/S6rjz2hpmsvrtLHDe uMRyxSQhCQbcyTb6rGjk+7lnJ5zWD6qCUtz6HOl0rrF2cTSSCtApGvNVA1gtcmZB sOUVGk6oMiH6flbqJTsC6udziGPw/Q+8KqFmUlEQKX7sF9HF8c87SnihyGnO0IrF Pb0+uMEyZ6Oys3ZD/zN/z2MBZlrtDfZegkYSEzVDAFBvWtyeE35JjgSqu8Qee3Fb vdWFmaY1k0MbT4HUm7SVbhLLDoDdXJMF+ze58rvHPbdTKfN3RK+SLVlFJCKgens= =kzGP -----END PGP SIGNATURE----- --jCnAjDinooNRbjf9lMCdIgBHUl6rEm5Ov-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/