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 810C040D574 for ; Tue, 9 Jun 2026 21:02:12 +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=1781038933; cv=none; b=GU3xS15ej0pKazneqnMLGVUOdF84A2tQIFASZazv2PhMQS2A1bKWcyj4BEweAlxP+mJS2UaA4rwMxCRTYTQlPWAR5Atb32Uh9exrRweX2Y7/SCvOoCKkDV7CQgyUh8MOcmyJa0REeZypyL5BwEGf207k090OhrZUw1BeVwsHrdY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781038933; c=relaxed/simple; bh=rzt0beXWZLzMDGQZI9q3UTAL9KNOEMOKTgKpwwuqgHU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HCEllFrIMX3no2Pt42uAkDMiwpJNJ8XUzv4n5msOju2anZF7e5rYY0f/mYHhprzrFcDc0LBySe/uI0oY7aVFxiUNjv81h1l73dtnaBEh+p/UC45ZwBCWIiOvKPfGOyFHquc9VCgWcSTcLI6DCvHc40nqzDlC4ykozD/+TsBwUk4= 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=xWfqD5Y2; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=CjqYj7EN; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=xWfqD5Y2; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=CjqYj7EN; 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="xWfqD5Y2"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="CjqYj7EN"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="xWfqD5Y2"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="CjqYj7EN" Received: from imap1.dmz-prg2.suse.org (unknown [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 B815B75A41; Tue, 9 Jun 2026 21:02:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1781038930; 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=0HeC28O7+Ug8YaDsg8d903XowQc1OEPHBViv9mHTYSA=; b=xWfqD5Y266ujaa3u/ujnjPxtdQngw8TF+jSluYS3sfjWo2dW9zcbWrjSG2uxjp/a7BdpEW WeWRdE8wIeWimma1pk4eONequ4X33eOmdH59jmhLk4nNlbfdgGaJ17l3HTna/Cz8tHzq9s NaDAGKIUuo2UemWQbIFs9L+/6VBKAbU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1781038930; 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=0HeC28O7+Ug8YaDsg8d903XowQc1OEPHBViv9mHTYSA=; b=CjqYj7ENp3Nqv4vEYEVkbESMCEFIsZszAVaO+0bhtg8FP7gDXOd0bDXlY0o6pHDSFIy6+H brHXyEudAXDLzbCA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1781038930; 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=0HeC28O7+Ug8YaDsg8d903XowQc1OEPHBViv9mHTYSA=; b=xWfqD5Y266ujaa3u/ujnjPxtdQngw8TF+jSluYS3sfjWo2dW9zcbWrjSG2uxjp/a7BdpEW WeWRdE8wIeWimma1pk4eONequ4X33eOmdH59jmhLk4nNlbfdgGaJ17l3HTna/Cz8tHzq9s NaDAGKIUuo2UemWQbIFs9L+/6VBKAbU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1781038930; 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=0HeC28O7+Ug8YaDsg8d903XowQc1OEPHBViv9mHTYSA=; b=CjqYj7ENp3Nqv4vEYEVkbESMCEFIsZszAVaO+0bhtg8FP7gDXOd0bDXlY0o6pHDSFIy6+H brHXyEudAXDLzbCA== 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 5DFBB779A7; Tue, 9 Jun 2026 21:02:09 +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 sWbHE1F/KGp7TwAAD6G6ig (envelope-from ); Tue, 09 Jun 2026 21:02:09 +0000 Date: Tue, 9 Jun 2026 22:02:07 +0100 From: Pedro Falcato To: Gladyshev Ilya Cc: Andrew Morton , ivgorbunov@me.com, Liam.Howlett@oracle.com, apopple@nvidia.com, artem.kuzin@huawei.com, baolin.wang@linux.alibaba.com, david@kernel.org, foxido@foxido.dev, harry.yoo@oracle.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, lorenzo.stoakes@oracle.com, mhocko@suse.com, muchun.song@linux.dev, rppt@kernel.org, surenb@google.com, torvalds@linuxfoundation.org, vbabka@suse.cz, willy@infradead.org, yuzhao@google.com, ziy@nvidia.com, kirill@shutemov.name Subject: Re: [PATCH v4 0/2] mm: improve folio refcount scalability Message-ID: References: <20260608154734.8e4115fde4e2e14a3b6892fb@linux-foundation.org> <1b6509a832dba9a7e24ddcdc23fb75247b267c78@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=us-ascii Content-Disposition: inline In-Reply-To: <1b6509a832dba9a7e24ddcdc23fb75247b267c78@linux.dev> X-Spam-Flag: NO X-Spam-Score: -8.30 X-Spamd-Result: default: False [-8.30 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_ENVRCPT(0.00)[me.com]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; MISSING_XM_UA(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCPT_COUNT_TWELVE(0.00)[23]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; URIBL_BLOCKED(0.00)[imap1.dmz-prg2.suse.org:helo,sashiko.dev:url,linux.dev:email,pedro-suse.lan:mid]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[linux-foundation.org,me.com,oracle.com,nvidia.com,huawei.com,linux.alibaba.com,kernel.org,foxido.dev,vger.kernel.org,kvack.org,suse.com,linux.dev,google.com,linuxfoundation.org,suse.cz,infradead.org,shutemov.name]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sashiko.dev:url,imap1.dmz-prg2.suse.org:helo,linux.dev:email] X-Spam-Level: On Tue, Jun 09, 2026 at 07:02:25PM +0000, Gladyshev Ilya wrote: > > > > On Mon, 08 Jun 2026 21:53:01 +0000 "Gladyshev Ilya" wrote: > > > > > > > > This patch optimizes small file read performance and overall folio refcount > > > scalability by refactoring page_ref_add_unless [core of folio_try_get]. > > > This is alternative approach to previous attempts to fix small read > > > performance by avoiding refcount bumps [1][2]. > > > > > Thanks. Nice numbers. > > > > AI review had some things to say: > > https://sashiko.dev/#/patchset/df26082871b4c65b2bd38d409026237c08572836@linux.dev > > Will look into it, thanks > > > I'm not sure we want all those new VM_BUG_ON_PAGE() calls in the long > > term. They look like development-time assistance. Perhaps you could > > make those a standalone patch at tail-of-series so we can keep it in > > linux-next for a couple of months then throw it away before any > > upstreaming? > > They are cheap and can catch bugs that are very difficult to debug. So > I'd like to keep them, if possible. Maybe change to WARN_ONCE, as David > suggested. Fully agree. I think it makes sense to keep these assertions for DEBUG_VM=y (which no one should be running in prod anyway..) -- Pedro