From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61191C5519F for ; Fri, 27 Nov 2020 19:36:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 27ACB2415A for ; Fri, 27 Nov 2020 19:36:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729305AbgK0Tfz (ORCPT ); Fri, 27 Nov 2020 14:35:55 -0500 Received: from shelob.surriel.com ([96.67.55.147]:41944 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729873AbgK0TEX (ORCPT ); Fri, 27 Nov 2020 14:04:23 -0500 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kij1v-0007WR-DO; Fri, 27 Nov 2020 14:03:39 -0500 Message-ID: <1f089a155d7501fb156da34744d282ae1f3d02f7.camel@surriel.com> Subject: Re: [PATCH 2/3] mm,thp,shm: limit gfp mask to no more than specified From: Rik van Riel To: Michal Hocko Cc: hughd@google.com, xuyu@linux.alibaba.com, akpm@linux-foundation.org, mgorman@suse.de, aarcange@redhat.com, willy@infradead.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, linux-mm@kvack.org, vbabka@suse.cz Date: Fri, 27 Nov 2020 14:03:39 -0500 In-Reply-To: <20201127075214.GK31550@dhcp22.suse.cz> References: <20201124194925.623931-1-riel@surriel.com> <20201124194925.623931-3-riel@surriel.com> <20201126134034.GI31550@dhcp22.suse.cz> <920c627330f3c7d295ab58edd1b62f28fdbd14bc.camel@surriel.com> <20201127075214.GK31550@dhcp22.suse.cz> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-RB8Eea94dyjyyrlX+Tly" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Sender: riel@shelob.surriel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-RB8Eea94dyjyyrlX+Tly Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2020-11-27 at 08:52 +0100, Michal Hocko wrote: > On Thu 26-11-20 13:04:14, Rik van Riel wrote: > >=20 > > I would be more than happy to implement things differently, > > but I am not sure what alternative you are suggesting. >=20 > Simply do not alter gfp flags? Or warn in some cases of a serious > mismatch. > E.g. GFP_ZONEMASK mismatch because there are already GFP_KERNEL users > of > shmem. Not altering the gfp flags is not really an option, because that would leads to attempting to allocate THPs with GFP_HIGHUSER, which is what is used to allocate regular tmpfs pages. If the THP configuration in sysfs says we should not be doing compaction/reclaim from THP allocations, we should obey that configuration setting, and use a=20 gfp_flags that results in no compaction/reclaim being done. --=20 All Rights Reversed. --=-RB8Eea94dyjyyrlX+Tly Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAl/BTYsACgkQznnekoTE 3oNVKwf/YO7U3RY5EPlAxFp0mzT+lGD3lKNx4dwZIkDqYpubeNo7+9Tc7+w8piu3 d1c07oZ5+r047lNnKx45UvzFdk1nBmO/Fc1QrV+e5inquCH+cSeYGOFelzOIF2k3 lASvGfF2tF634Z9MgpRPdLT2U/LS6o7e6B94n8SiKV0LXVxQH07UbhriQrSp62BV 9CjGfdWnDv+REXxQ0f0yvSShBgUWhnyKijcGia9CTSoszzOj3LvlD8jvdi6/RT13 x/bEhNGUFvTlfoNVYLRpZe3TUrXxEaXO4YfX9eiTEEM2EJcfNk9SWi/kuVelKdIv Djk8hPni4259RnY0+c9hUEse4ok76g== =NORH -----END PGP SIGNATURE----- --=-RB8Eea94dyjyyrlX+Tly-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 145F6C3E8C5 for ; Fri, 27 Nov 2020 19:03:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 67562221F7 for ; Fri, 27 Nov 2020 19:03:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67562221F7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AB3476B0036; Fri, 27 Nov 2020 14:03:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A3B9B6B005C; Fri, 27 Nov 2020 14:03:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 904166B0068; Fri, 27 Nov 2020 14:03:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0065.hostedemail.com [216.40.44.65]) by kanga.kvack.org (Postfix) with ESMTP id 77AA76B0036 for ; Fri, 27 Nov 2020 14:03:52 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3AB9E1EF1 for ; Fri, 27 Nov 2020 19:03:52 +0000 (UTC) X-FDA: 77531122704.09.crook79_2f00e932738a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 1D3D1180AD804 for ; Fri, 27 Nov 2020 19:03:52 +0000 (UTC) X-HE-Tag: crook79_2f00e932738a X-Filterd-Recvd-Size: 3167 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Fri, 27 Nov 2020 19:03:50 +0000 (UTC) Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kij1v-0007WR-DO; Fri, 27 Nov 2020 14:03:39 -0500 Message-ID: <1f089a155d7501fb156da34744d282ae1f3d02f7.camel@surriel.com> Subject: Re: [PATCH 2/3] mm,thp,shm: limit gfp mask to no more than specified From: Rik van Riel To: Michal Hocko Cc: hughd@google.com, xuyu@linux.alibaba.com, akpm@linux-foundation.org, mgorman@suse.de, aarcange@redhat.com, willy@infradead.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, linux-mm@kvack.org, vbabka@suse.cz Date: Fri, 27 Nov 2020 14:03:39 -0500 In-Reply-To: <20201127075214.GK31550@dhcp22.suse.cz> References: <20201124194925.623931-1-riel@surriel.com> <20201124194925.623931-3-riel@surriel.com> <20201126134034.GI31550@dhcp22.suse.cz> <920c627330f3c7d295ab58edd1b62f28fdbd14bc.camel@surriel.com> <20201127075214.GK31550@dhcp22.suse.cz> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-RB8Eea94dyjyyrlX+Tly" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: --=-RB8Eea94dyjyyrlX+Tly Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2020-11-27 at 08:52 +0100, Michal Hocko wrote: > On Thu 26-11-20 13:04:14, Rik van Riel wrote: > >=20 > > I would be more than happy to implement things differently, > > but I am not sure what alternative you are suggesting. >=20 > Simply do not alter gfp flags? Or warn in some cases of a serious > mismatch. > E.g. GFP_ZONEMASK mismatch because there are already GFP_KERNEL users > of > shmem. Not altering the gfp flags is not really an option, because that would leads to attempting to allocate THPs with GFP_HIGHUSER, which is what is used to allocate regular tmpfs pages. If the THP configuration in sysfs says we should not be doing compaction/reclaim from THP allocations, we should obey that configuration setting, and use a=20 gfp_flags that results in no compaction/reclaim being done. --=20 All Rights Reversed. --=-RB8Eea94dyjyyrlX+Tly Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAl/BTYsACgkQznnekoTE 3oNVKwf/YO7U3RY5EPlAxFp0mzT+lGD3lKNx4dwZIkDqYpubeNo7+9Tc7+w8piu3 d1c07oZ5+r047lNnKx45UvzFdk1nBmO/Fc1QrV+e5inquCH+cSeYGOFelzOIF2k3 lASvGfF2tF634Z9MgpRPdLT2U/LS6o7e6B94n8SiKV0LXVxQH07UbhriQrSp62BV 9CjGfdWnDv+REXxQ0f0yvSShBgUWhnyKijcGia9CTSoszzOj3LvlD8jvdi6/RT13 x/bEhNGUFvTlfoNVYLRpZe3TUrXxEaXO4YfX9eiTEEM2EJcfNk9SWi/kuVelKdIv Djk8hPni4259RnY0+c9hUEse4ok76g== =NORH -----END PGP SIGNATURE----- --=-RB8Eea94dyjyyrlX+Tly--