Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754603AbbGaPNp (ORCPT ); Fri, 31 Jul 2015 11:13:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47445 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753914AbbGaPNo (ORCPT ); Fri, 31 Jul 2015 11:13:44 -0400 Message-ID: <55BB90A2.2090908@redhat.com> Date: Fri, 31 Jul 2015 17:13:38 +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 32/36] thp: reintroduce split_huge_page() References: <1437402069-105900-1-git-send-email-kirill.shutemov@linux.intel.com> <1437402069-105900-33-git-send-email-kirill.shutemov@linux.intel.com> In-Reply-To: <1437402069-105900-33-git-send-email-kirill.shutemov@linux.intel.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CgU9jP0hnaaHaHKvVhsHscoIBlKhaEP1s" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2589 Lines: 73 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CgU9jP0hnaaHaHKvVhsHscoIBlKhaEP1s Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 07/20/2015 04:21 PM, Kirill A. Shutemov wrote: > This patch adds implementation of split_huge_page() for new > refcountings. >=20 > Unlike previous implementation, new split_huge_page() can fail if > somebody holds GUP pin on the page. It also means that pin on page > would prevent it from bening split under you. It makes situation in > many places much cleaner. >=20 > The basic scheme of split_huge_page(): >=20 > - Check that sum of mapcounts of all subpage is equal to page_count()= > plus one (caller pin). Foll off with -EBUSY. This way we can avoid > useless PMD-splits. >=20 > - Freeze the page counters by splitting all PMD and setup migration > PTEs. >=20 > - Re-check sum of mapcounts against page_count(). Page's counts are > stable now. -EBUSY if page is pinned. >=20 > - Split compound page. >=20 > - Unfreeze the page by removing migration entries. >=20 > Signed-off-by: Kirill A. Shutemov > Tested-by: Sasha Levin > Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand > --- > include/linux/huge_mm.h | 7 +- > include/linux/pagemap.h | 13 +- > mm/huge_memory.c | 318 ++++++++++++++++++++++++++++++++++++++++= ++++++++ > mm/internal.h | 26 +++- > mm/rmap.c | 21 ---- > 5 files changed, 357 insertions(+), 28 deletions(-) >=20 >=20 --CgU9jP0hnaaHaHKvVhsHscoIBlKhaEP1s 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 iQEcBAEBCAAGBQJVu5CiAAoJEHTzHJCtsuoCMosH/RZupRA45qRHsJC95qFpHL3P 4VlrZ4r6cNzNFbZKvF5qdwnPfRvpEVhxeLO5vfCgPHbgAvsa6Mj1ga0eC68Z916o 5pwHtKI/lTuvNqpzySoDyzgMQ8uBPJN2H+8EUWi+bZj1Kdu+B8wASSqDhCOxngrG o3KxF7ALaEFORD/F5TtEBDylEK0hSMQEROa3wOCAf3smIWvFVSyg0IeI83IM3NBW lyFuFjV6NhCaU9BqmoMVb6Ry5bS3vcEDsQv289zN/FuW9DiCwOibUI34qc+Zmpf6 No4pynt7AUSdAXq5YAT/AajTFlzt8/rW9g0CNdINDqL0ofaTEiMCH6PY5wftVR8= =tHnU -----END PGP SIGNATURE----- --CgU9jP0hnaaHaHKvVhsHscoIBlKhaEP1s-- -- 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/