Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3606986pxu; Mon, 30 Nov 2020 06:46:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJy4hxOciQJh25nm8QHn5T5dVA4Qz+JLtSjnBFmEPiddMaeKKtlS6cziU73skykwceroaaxd X-Received: by 2002:a05:6402:1115:: with SMTP id u21mr22247337edv.148.1606747565870; Mon, 30 Nov 2020 06:46:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606747565; cv=none; d=google.com; s=arc-20160816; b=VUsxVp/flUL50MAk/fuXE5EyeE8y/dwqTVYc6WYg7llzbFAk2oFC8vhqUpvab3UPMW WL90b4QO2eTIaUnIYsNV5wPBM/PgZMFHf6LtAdBCsw+9sIs8fUGD9+5mihAf1EEudf5n N6TGv0oqrSfuOSB4sLmCDKkkMkOicb1i5XFPnoBDpsN8FnP2tuhXgcfcPts6DIq8Xvss RPi4vIVHy5y7+3kSd9PXhrGZNiOecnz/CNkp+uNOU4FqSongdLQD9u3umMxBhIZR7ImX oV5KA+D1NaXCw0GvNGUItEhEzfBo0jDc1SpWuxRVzsX1uHuZZtGmCJBJbSDmnbSYEhwN MzoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=bpLGTMSBAGCp3OyPri91X1kA1iz1xN3g+321mmBxx14=; b=CwFwDcV1SY+jbdfn0OKQ3QwjcPiVYEO76wfaZw+mQWZ12yja0GrV/HKDIsdb+Cbvpk T9HjLl9iW4Q04w2nV2rvu4OCrErf98w3sYZqMcYl1M7kKhmpG1Qlq355LLGXd/7LlXaw ilAgzNB4hQEtnXajvCc9rgu7BL5SqKQaFztmgk4TquU1Z6eeAvI9Wg4MrJtNKsXTxORG o67uRf2vUWUpVWlzgKG9qcxhCYIJvU07K5oCJ0kyMSGeldf1poEYU4V3oFXqZ+SMZAGW XFLgL8Xd1yUEdgn9avF/4WeEDcANJjc5eeklwYFnTHDohd06d8+GaXGXdEz7kYCWkKJl KRTg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y1si6219140ede.409.2020.11.30.06.45.42; Mon, 30 Nov 2020 06:46:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727359AbgK3Ok4 (ORCPT + 99 others); Mon, 30 Nov 2020 09:40:56 -0500 Received: from shelob.surriel.com ([96.67.55.147]:54784 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726103AbgK3Ok4 (ORCPT ); Mon, 30 Nov 2020 09:40:56 -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 1kjkLR-0000v7-Ii; Mon, 30 Nov 2020 09:40:01 -0500 Message-ID: <0bf4037559563bd51f6ac68d659e9f886387fa7e.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: Mon, 30 Nov 2020 09:40:01 -0500 In-Reply-To: <20201130100053.GD17338@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> <1f089a155d7501fb156da34744d282ae1f3d02f7.camel@surriel.com> <20201130100053.GD17338@dhcp22.suse.cz> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-MwKFZQvAu7UAtgs7ip0f" 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 --=-MwKFZQvAu7UAtgs7ip0f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2020-11-30 at 11:00 +0100, Michal Hocko wrote: > On Fri 27-11-20 14:03:39, Rik van Riel wrote: > > On Fri, 2020-11-27 at 08:52 +0100, Michal Hocko wrote: > > > On Thu 26-11-20 13:04:14, Rik van Riel wrote: > > > > 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. > >=20 > > 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. >=20 > Right but that is a completely different reason to alter the mask and > it > would be really great to know whether this is a theoretical concern > or > those users simply do not ever use THPs. Btw. should they be using > THPs > even if they opt themselves into GFP_KERNEL restriction? I suppose disabling THPs completely if the gfp_mask passed to shmem_getpage_gfp() is not GFP_HIGHUSER is another option. That seems like it might come with its own pitfalls, though, both functionality wise and maintenance wise. Does anyone have strong feelings between "limit gfp_mask" and "disable THP for !GFP_HIGHUSER"? --=20 All Rights Reversed. --=-MwKFZQvAu7UAtgs7ip0f 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/FBEEACgkQznnekoTE 3oMGOAf/cwgErDAEtBf5TbUyPbr3g7+END1IDIIyQm7IAI7NhbuuikStX+3cDdEp FJPP/hOHqEj3+X9j6wFwovpsnhac8C/iuCoif5QJ+5HyJbDGCcK7EKxubdTHZMD0 jyJG0U2M8XACDoXiImhfZ0P61mWeYAoOl7S+CLtAP/XcM067M2Jp+q5F+ARZRN94 2pr4z+A2xHoShqWdG/BX6pOX5O27yggZaQejLLU0uPulbitd8WP4X0zY2h4IyKtL jD2p25Wcax8mvZJhNM/0V00/diPwI8nm6SgJIG4eGg1FKB+KkUhY9jzh8icE7vuO LKi4pLDIHziGqlsa1Cm1MLXbVj5F2Q== =a55D -----END PGP SIGNATURE----- --=-MwKFZQvAu7UAtgs7ip0f--