Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751656AbdGYRrl (ORCPT ); Tue, 25 Jul 2017 13:47:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42828 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751466AbdGYRrk (ORCPT ); Tue, 25 Jul 2017 13:47:40 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A76677F40F Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=riel@redhat.com Message-ID: <1501004857.26846.19.camel@redhat.com> Subject: Re: [PATCH -mm -v3 02/12] mm, THP, swap: Support to reclaim swap space for THP swapped out From: Rik van Riel To: "Huang, Ying" , Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Johannes Weiner , Minchan Kim , Hugh Dickins , Shaohua Li Date: Tue, 25 Jul 2017 13:47:37 -0400 In-Reply-To: <20170724051840.2309-3-ying.huang@intel.com> References: <20170724051840.2309-1-ying.huang@intel.com> <20170724051840.2309-3-ying.huang@intel.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-o2eE1NAoZv70K1qCkVmO" Mime-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 25 Jul 2017 17:47:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2375 Lines: 63 --=-o2eE1NAoZv70K1qCkVmO Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2017-07-24 at 13:18 +0800, Huang, Ying wrote: > From: Huang Ying >=20 > The normal swap slot reclaiming can be done when the swap count > reaches SWAP_HAS_CACHE.=C2=A0=C2=A0But for the swap slot which is backing= a > THP, > all swap slots backing one THP must be reclaimed together, because > the > swap slot may be used again when the THP is swapped out again later. > So the swap slots backing one THP can be reclaimed together when the > swap count for all swap slots for the THP reached SWAP_HAS_CACHE.=C2=A0= =C2=A0In > the patch, the functions to check whether the swap count for all swap > slots backing one THP reached SWAP_HAS_CACHE are implemented and used > when checking whether a swap slot can be reclaimed. >=20 > To make it easier to determine whether a swap slot is backing a THP, > a > new swap cluster flag named CLUSTER_FLAG_HUGE is added to mark a swap > cluster which is backing a THP (Transparent Huge Page).=C2=A0=C2=A0Becaus= e THP > swap in as a whole isn't supported now.=C2=A0=C2=A0After deleting the THP= from > the swap cache (for example, swapping out finished), the > CLUSTER_FLAG_HUGE flag will be cleared.=C2=A0=C2=A0So that, the normal pa= ges > inside THP can be swapped in individually. >=20 > Signed-off-by: "Huang, Ying" > Cc: Johannes Weiner > Cc: Minchan Kim > Cc: Hugh Dickins > Cc: Shaohua Li > Cc: Rik van Riel >=20 Acked-by: Rik van Riel --=20 All rights reversed --=-o2eE1NAoZv70K1qCkVmO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJZd4Q5AAoJEM553pKExN6DrRcIAKvnKL8laMQ9MPFPw3EoDeta f5egjp11AMxck1NOJ0nq/j/1hWjQjvsjwnaubqPdfuyUv71N4aSV9Jb+YahSZv82 xeQV5lvVI1+7mqMLEsEovDMIJ9bq9ToW+d7xglIMUuGrMI20xsxfz/YPEmB6XOpZ KD77B/1USBab3WLVjbcSr38xUcAbHCHvZ9H40ZGc/3js891BY5V/2e8/TSZIWw+M adNjK0CrrqB7HezTBuycImklBwg31YH2zMGWA5sTE27qoQhu1QZ/l/NBXbwNl80V 5CN1pAZ6B5fyHV2DZZ5UtUcz/dkBx1fkMPbbWSPfd72ahwBFmh+UV32J7r1Htyc= =0QHb -----END PGP SIGNATURE----- --=-o2eE1NAoZv70K1qCkVmO--