From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BCA433E5EC6 for ; Tue, 2 Jun 2026 13:47:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780408023; cv=none; b=L/Qecw+hvXb+bN4MaLW28GbYoB/CJZDbAoCY1cti+BNgVuFdg6cPLIh0ZJOEKe9UsgalOpT1FR23srRjGBCqJl7R0G7Jr1FnXB1J/q0Q63lSbS+w96mnCdqbXHhR7OKcqzyDZroGc6TAk+UMeSD/5lV6qygFqRYbUJaT4Gu1NNo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780408023; c=relaxed/simple; bh=deNNdJiFpfop36q5b13OYp25z/A7PRis0XsjMhxSS74=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TssVryO3aJBODJxFvb/gmuDvnJboMYxCKQHTdMeycGeFprWJ1wIufrGVlLkztI/L1YnzQbe2KdHzLIEZ/nyO8HP5YN5Vw20Suv3jGV6+b1PVzx5dhRZSD0GUn2bJ3X9uGlU07VXAFBjVLyfT5bIgEXMCyOgHGZhk/RVTEXccLko= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=bDPAhczT; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=S+XdiAPw; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=WsFuQ4d5; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=4t//PCFP; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="bDPAhczT"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="S+XdiAPw"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="WsFuQ4d5"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="4t//PCFP" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (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 D7F2667EE6; Tue, 2 Jun 2026 13:46:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1780408020; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cmVb47wh2hH8fLzFAOWLUOjb7eKLNxkG0RvgTDTKxVU=; b=bDPAhczT57Bx3yapCXs1A22p9HhKItXr2vadOkJeljpDRKTzh+Os0zhWtgW6cirR/XpF0i BiId/NradA+gu7D3WCraIZQR1rUO7CyqdsI6UJimb90oJViOhWF9MyI077CkYnMPBr9fDO NdUOyH8/JGSL8Klce9ncoS7zbVU+IiE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1780408020; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cmVb47wh2hH8fLzFAOWLUOjb7eKLNxkG0RvgTDTKxVU=; b=S+XdiAPw9z4xsrDNETCzQr6EXuqMMFt/EXdUhmw56nT4V/0bf1qrBmEi+Uiz+L8JhdvJUb iQnaCFD1/S+DaLDg== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=WsFuQ4d5; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="4t//PCFP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1780408019; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cmVb47wh2hH8fLzFAOWLUOjb7eKLNxkG0RvgTDTKxVU=; b=WsFuQ4d5+DlBtAGOsUf1HXUU9dR3jz+tHgKL7kuJ/vzTfYOpHwZ8GsrradUAfUcDJ6177p 0HHfSk4Rtn6QgSAshLk2fIbX6ZLCZP5sY/jUjRQWrOFFgoxX4F+u395Pu0j9objN4tPz3q e/XGGB88vXqYVl4Thi4/5IxH4c+zMyI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1780408019; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cmVb47wh2hH8fLzFAOWLUOjb7eKLNxkG0RvgTDTKxVU=; b=4t//PCFPaT+VqzdJNYfbtazRtPQOy6lTyKr2BqnlrV6xIw2g7IxIiEd5L9lljU2TFqpxXz tJbR0XtmT4/fGZBw== Received: from imap1.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 imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 16270779A7; Tue, 2 Jun 2026 13:46:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id YJ3xAdPeHmraSwAAD6G6ig (envelope-from ); Tue, 02 Jun 2026 13:46:59 +0000 Date: Tue, 2 Jun 2026 14:46:57 +0100 From: Pedro Falcato To: Dennis Zhou Cc: Kaitao Cheng , akpm@linux-foundation.org, tj@kernel.org, cl@gentwo.org, mhocko@suse.com, vbabka@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, muchun.song@linux.dev, Kaitao Cheng Subject: Re: [PATCH 1/2] mm/percpu: Preserve NOFS/NOIO scope during chunk create and populate Message-ID: References: <20260528132917.81123-1-kaitao.cheng@linux.dev> <20260528132917.81123-2-kaitao.cheng@linux.dev> <5a4aa532-77a0-436a-8f5e-1bbcf2db6bbb@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Flag: NO X-Rspamd-Action: no action X-Spam-Level: X-Spamd-Result: default: False [-4.51 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_SEVEN(0.00)[11]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:dkim]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Queue-Id: D7F2667EE6 X-Spam-Score: -4.51 On Sat, May 30, 2026 at 03:32:19PM +0200, Dennis Zhou wrote: > > > > I’ll try to do it. > > > > Following your suggestion, including in [PATCH 2/2], I will also try a > > different approach and fix the issue by reducing the scope of the > > pcpu_alloc_mutex critical section. > > > > No please don't. The point of the percpu mutex is to ensure that only > one person is ever possibly creating a new chunk. If you drop the mutex, > then you have to deal with concurrent callers when available percpu > memory is low. Percpu memory is expensive and unmovable so the cost is > in the control plane to avoid excess fragmentation. And so is slab memory, yet this is not a problem. We shouldn't keep problematic locks just because they may aid fragmentation slightly. -- Pedro