Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754730AbbGaPPG (ORCPT ); Fri, 31 Jul 2015 11:15:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51236 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754558AbbGaPPC (ORCPT ); Fri, 31 Jul 2015 11:15:02 -0400 Message-ID: <55BB90F1.9000809@redhat.com> Date: Fri, 31 Jul 2015 17:14:57 +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 34/36] thp: introduce deferred_split_huge_page() References: <1437402069-105900-1-git-send-email-kirill.shutemov@linux.intel.com> <1437402069-105900-35-git-send-email-kirill.shutemov@linux.intel.com> In-Reply-To: <1437402069-105900-35-git-send-email-kirill.shutemov@linux.intel.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MwuDhwB3VxfBQKH7xgSpPENe9frpHfQn1" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2560 Lines: 64 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --MwuDhwB3VxfBQKH7xgSpPENe9frpHfQn1 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 07/20/2015 04:21 PM, Kirill A. Shutemov wrote: > Currently we don't split huge page on partial unmap. It's not an ideal > situation. It can lead to memory overhead. >=20 > Furtunately, we can detect partial unmap on page_remove_rmap(). But we > cannot call split_huge_page() from there due to locking context. >=20 > It's also counterproductive to do directly from munmap() codepath: in > many cases we will hit this from exit(2) and splitting the huge page > just to free it up in small pages is not what we really want. >=20 > The patch introduce deferred_split_huge_page() which put the huge page > into queue for splitting. The splitting itself will happen when we get > memory pressure via shrinker interface. The page will be dropped from > list on freeing through compound page destructor. >=20 > Signed-off-by: Kirill A. Shutemov > Tested-by: Sasha Levin > Tested-by: Aneesh Kumar K.V > Acked-by: Vlastimil Babka Acked-by: Jerome Marchand > --- > include/linux/huge_mm.h | 4 ++ > include/linux/mm.h | 2 + > mm/huge_memory.c | 127 ++++++++++++++++++++++++++++++++++++++++= ++++++-- > mm/migrate.c | 1 + > mm/page_alloc.c | 2 +- > mm/rmap.c | 7 ++- > 6 files changed, 138 insertions(+), 5 deletions(-) > --MwuDhwB3VxfBQKH7xgSpPENe9frpHfQn1 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 iQEcBAEBCAAGBQJVu5DxAAoJEHTzHJCtsuoCXYcH/2IGPhHNhM4MrfV347UtebNZ 7fsu27iZasrpeyGBZeNGXqkAEABTa33CS4VQwuYgzdJm0NT5QMCQcpZqRFFw9b3/ dh6u4xp+LeATZ1wLq6BLliEV3/2SfpygBExAy7cgurSJER2pDoBlKt1zJvvAV/zg Vcurwtyi8JFzOErHncbE0zgHqGmnoyTnF4vH599izsp/e7x/vJOdLoWoAne+s8Pz WG5vHZVKUvswE+nPokXODN+XcdrFA+UFVu9VXqxLsbV6GGXpz2M9MMn2r0N37Ppj LYLmv0lKGBF1H+7gnBrRiZQKbW9HIH61G9FsA5E6dVcJTDr2P7Da8BCVMlUPxnY= =/tP5 -----END PGP SIGNATURE----- --MwuDhwB3VxfBQKH7xgSpPENe9frpHfQn1-- -- 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/