Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2485190rdb; Fri, 8 Dec 2023 09:23:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IFIernUJXSkKW4XNSr3SNs4NHbY91d1zV6YMBKSz1X9p2yyHsGxvGJBIsVROFJ/Hxzr/VRu X-Received: by 2002:a17:90a:fc8e:b0:286:d1d6:9a61 with SMTP id ci14-20020a17090afc8e00b00286d1d69a61mr369829pjb.7.1702056215944; Fri, 08 Dec 2023 09:23:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702056215; cv=none; d=google.com; s=arc-20160816; b=fkdRgOClCz7w4guIdJMX/UzoO4i3KDrDM0DVWIguLCGXnC1/3Z2b4lUBq94FpX5FaT dj8pNJ8cZZJWcvToXzYOdDBxhY4lMGdBFgT+s4g8uZCZV7pp3HW9othy4mjPdRgHo1yz NPqwBn0p5uElQNA1x0VBEVXm8fQGXVATLlw7P+0AePJgkfYjU1kTbBdxwPqVMozSuhlK 0FZxDESwHNsfu1MqHKGXRHhVo/eUAa0b9kPizLzrp8Cwi/7F4uQuea1T0ShHhsU269Vp eNXww+0gNV/77/gSZscEi5mngWjAdzjkRs8yIkbMeQ3EI/VpKfEvqzT8GBlZWHEmt6Nh Ribw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature:dkim-signature:dkim-signature; bh=UAUNZmXImFEly07WmlFPk/rsfz0i0CpByRb3j3+Iq3w=; fh=/ZeCbDEQph2896CIVQwe0VlXa9ZMGehxL4Sh5aMjTgA=; b=cSQpDyHNP8iP+4MitETx0dQLwhw9dPx0xXxYFaMGCnLlmWLNGSDe/k6EKM4ny+Ojte cSKtEi+8IX5MGcVXkEV+5m7rOtAAdpmyQfhK8OTQB0n90i4bxMb7cTIWjHu1/yY1d33B LHxKs0LGER7RjOlg9J8ZTUP0S0znbSckoQR41PZzxyNYrNn5WM7vuNDbYZUuKxI/i8oB 726IqAtVUPK/ndBonPbRAUzO59HV7m/wUYXAr9qndjv7G0nWlO5FtcVSlliRCqE15/oz 1nSHRYAtsaaQw3lrvapVaTMveqDV/T02rE7xXdZ75fK18LiHi3+IhafuddziJMOllKL+ RlAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=n5QvPTqd; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=OsByj8iX; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id y18-20020a634b12000000b005c6259da621si1787874pga.555.2023.12.08.09.23.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 09:23:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=n5QvPTqd; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=OsByj8iX; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 261C1831358A; Fri, 8 Dec 2023 09:23:33 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1574446AbjLHRXF (ORCPT + 99 others); Fri, 8 Dec 2023 12:23:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232481AbjLHRWv (ORCPT ); Fri, 8 Dec 2023 12:22:51 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3423C10EF; Fri, 8 Dec 2023 09:22:57 -0800 (PST) Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 61CC91F461; Fri, 8 Dec 2023 17:22:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1702056175; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UAUNZmXImFEly07WmlFPk/rsfz0i0CpByRb3j3+Iq3w=; b=n5QvPTqdKgnIQ7TkatCriUq/ZLfkJnZf0XONhD3dHvd9HhCnmP4AA4KZWTPIx1ipHIyTIi /3Hu+1qjCghRvq8cv/fyUKeHm+20wZA2GO7ZTiA4V7EhBqsWrJlPWOLweVuMQ5fCsA18cP VtlAzmzSLpR1VlnInB/hAIavhryomT0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1702056175; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UAUNZmXImFEly07WmlFPk/rsfz0i0CpByRb3j3+Iq3w=; b=POX53lvAyWq1i0hdNqrmb+7w6H+rtpn5UbMBV4yNZxlkZSuvwbb+ZVRwozcafxOsbyT1HJ zoyTu6+TinSJ76Bg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1702056174; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UAUNZmXImFEly07WmlFPk/rsfz0i0CpByRb3j3+Iq3w=; b=OsByj8iXJQyBMkx30AGQOtPSKx+m+Lqk1WBsX9ZDoBadLPnJamq/fwffbg6garpPjycDNw cp1GlwGrDTOLf/OR1wa8DGBwnBhBi1xZrDKyGGHdZqv8u7nneAWjc3SkBXQU6DzWOz908w JIIIaS4pxDWfNKaz365sHpWfiEAm9Ks= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1702056174; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UAUNZmXImFEly07WmlFPk/rsfz0i0CpByRb3j3+Iq3w=; b=50+V6Tu6xyOcSIJou+0iGZ3Js9M6iFM6iIF7whqSMwix/y5OxSpB+RK8LqHgBSjw22TVtn FfGVjLPwaqglp8Dw== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 4E5B213A6B; Fri, 8 Dec 2023 17:22:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id ZhbTEu5Qc2XTSwAAn2gu4w (envelope-from ); Fri, 08 Dec 2023 17:22:54 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id CD7E6A07DC; Fri, 8 Dec 2023 18:22:49 +0100 (CET) Date: Fri, 8 Dec 2023 18:22:49 +0100 From: Jan Kara To: Alexander Mikhalitsyn Cc: brauner@kernel.org, linux-fsdevel@vger.kernel.org, Jan Kara , Alexander Viro , linux-kernel@vger.kernel.org Subject: Re: [PATCH] fs: super: use GFP_KERNEL instead of GFP_USER for super block allocation Message-ID: <20231208172249.3274eh4cjdnwhjch@quack3> References: <20231208151022.156273-1-aleksandr.mikhalitsyn@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231208151022.156273-1-aleksandr.mikhalitsyn@canonical.com> X-Spam-Score: 8.85 X-Spamd-Bar: + Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=OsByj8iX; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=50+V6Tu6; dmarc=none; spf=softfail (smtp-out2.suse.de: 2a07:de40:b281:104:10:150:64:98 is neither permitted nor denied by domain of jack@suse.cz) smtp.mailfrom=jack@suse.cz X-Rspamd-Server: rspamd2 X-Spamd-Result: default: False [1.79 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:98:from]; TO_DN_SOME(0.00)[]; R_SPF_SOFTFAIL(4.60)[~all]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[suse.cz:+]; MX_GOOD(-0.01)[]; NEURAL_HAM_SHORT(-0.20)[-0.991]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; BAYES_HAM(-3.00)[100.00%]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(1.20)[suse.cz]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:98:from]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.cz:dkim,suse.cz:email,canonical.com:email,linux.org.uk:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: 1.79 X-Rspamd-Queue-Id: 61CC91F461 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 08 Dec 2023 09:23:33 -0800 (PST) On Fri 08-12-23 16:10:22, Alexander Mikhalitsyn wrote: > There is no reason to use a GFP_USER flag for struct super_block allocation > in the alloc_super(). Instead, let's use GFP_KERNEL for that. > > From the memory management perspective, the only difference between > GFP_USER and GFP_KERNEL is that GFP_USER allocations are tied to a cpuset, > while GFP_KERNEL ones are not. > > There is no real issue and this is not a candidate to go to the stable, > but let's fix it for a consistency sake. > > Cc: Jan Kara > Cc: Alexander Viro > Cc: Christian Brauner > Cc: linux-fsdevel@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Alexander Mikhalitsyn Yeah, since we allocate other filesystem objects with GFP_KERNEL as well I agree. Feel free to add: Reviewed-by: Jan Kara Honza > diff --git a/fs/super.c b/fs/super.c > index 076392396e72..6fe482371633 100644 > --- a/fs/super.c > +++ b/fs/super.c > @@ -323,7 +323,7 @@ static void destroy_unused_super(struct super_block *s) > static struct super_block *alloc_super(struct file_system_type *type, int flags, > struct user_namespace *user_ns) > { > - struct super_block *s = kzalloc(sizeof(struct super_block), GFP_USER); > + struct super_block *s = kzalloc(sizeof(struct super_block), GFP_KERNEL); > static const struct super_operations default_op; > int i; > > -- > 2.34.1 > -- Jan Kara SUSE Labs, CR