Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753891AbbGaOqt (ORCPT ); Fri, 31 Jul 2015 10:46:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59179 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752092AbbGaOqs (ORCPT ); Fri, 31 Jul 2015 10:46:48 -0400 Message-ID: <55BB8A53.8090704@redhat.com> Date: Fri, 31 Jul 2015 16:46:43 +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 03/36] memcg: adjust to support new THP refcounting References: <1437402069-105900-1-git-send-email-kirill.shutemov@linux.intel.com> <1437402069-105900-4-git-send-email-kirill.shutemov@linux.intel.com> In-Reply-To: <1437402069-105900-4-git-send-email-kirill.shutemov@linux.intel.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tKKHwh4qmnIDIis1H5cVLgl3DRCpUc9Bc" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2776 Lines: 70 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --tKKHwh4qmnIDIis1H5cVLgl3DRCpUc9Bc Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 07/20/2015 04:20 PM, Kirill A. Shutemov wrote: > As with rmap, with new refcounting we cannot rely on PageTransHuge() to= > check if we need to charge size of huge page form the cgroup. We need t= o > get information from caller to know whether it was mapped with PMD or > PTE. >=20 > We do uncharge when last reference on the page gone. At that point if w= e > see PageTransHuge() it means we need to unchange whole huge page. >=20 > The tricky part is partial unmap -- when we try to unmap part of huge > page. We don't do a special handing of this situation, meaning we don't= > uncharge the part of huge page unless last user is gone or > split_huge_page() is triggered. In case of cgroup memory pressure > happens the partial unmapped page will be split through shrinker. This > should be good enough. >=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/memcontrol.h | 16 +++++++----- > kernel/events/uprobes.c | 7 +++--- > mm/filemap.c | 8 +++--- > mm/huge_memory.c | 33 ++++++++++++------------ > mm/memcontrol.c | 62 +++++++++++++++++---------------------= -------- > mm/memory.c | 28 ++++++++++----------- > mm/shmem.c | 21 +++++++++------- > mm/swapfile.c | 9 ++++--- > mm/userfaultfd.c | 6 ++--- > 9 files changed, 92 insertions(+), 98 deletions(-) --tKKHwh4qmnIDIis1H5cVLgl3DRCpUc9Bc 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 iQEcBAEBCAAGBQJVu4pTAAoJEHTzHJCtsuoCVuUIAIvl1viUxIL1N9Q0y+ae2G6d GS/t/a0v7D30pFVmlVPCU2sDUnfqG/loRM+2NooPp6AIUY8HY/JAJkD9M0nPibRp t/UU44Gp3Ui7RnB30hrTJwra0ITuPwo3rAPoBurvqt/gHT6B2C6E6QjFA8Pqnklm LBG7rYN5B+y3GVc2IGJWRsjAPWJwTi/TTlL9PCuFnTjfcIWe/Ce0S82LtMG3boGD rDbBZ2XhONGh0oPJmIJTM4tSxt/EbuKtVlRLW645xO4aVKpgaxY3O2Ns9GwB3/Cl /dO75pNjq2dKhJkwVLbVE12ovOtFCYUPgFqFDOyyf0Ezdwzatq/1/990NSpTsgE= =WHtF -----END PGP SIGNATURE----- --tKKHwh4qmnIDIis1H5cVLgl3DRCpUc9Bc-- -- 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/