From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-170.mta1.migadu.com (out-170.mta1.migadu.com [95.215.58.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A71FE481FA3 for ; Tue, 9 Jun 2026 19:02:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781031755; cv=none; b=D4gl+oV+PHiNqx/y3aMCI1uYB7toDC1R31GgvH5W2FJ7SfYh+yxpWPrs7876oV9EFRt9Fw4y7h9Q3hmRFOrvpZ8QIVUveBmyWeIWAAhfPFAp87aDfK0/GtFbSektTeKWifhM+7iqmHwS8qLCfv74By8aNLJh/Jdt9dPmBK9ncvg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781031755; c=relaxed/simple; bh=A72nv7lnJE8AQGZ6fjeoxjFp6iHx3Dm5wrYQknxPrP8=; h=MIME-Version:Date:Content-Type:From:Message-ID:Subject:To:Cc: In-Reply-To:References; b=Gq7qAfbMlwcaFeCvzJngr1QxSmk+lSO814v2XOwj+dEkLEEPLzAFkp4KlTEBJPPOZVthmEPt9FKXJIwBDQseSVIKH/LyWCSmPj8rBt4fsTMrp4Uh2DrdPNiRouJZOSyn0e3zC2cKxr2TIt96WLgUutHjm4zSbTU+57PwWcdJ0Y4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=aE3DSxvB; arc=none smtp.client-ip=95.215.58.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="aE3DSxvB" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1781031750; h=from:from:reply-to:subject:subject: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=EOtMs5rqZfbuAW2ldhtXi46B8R0gj+b3MU1GZP9Re8k=; b=aE3DSxvBnLeIfrzT7nkodC0YGRnfhF5zMrZwdWQC3a48frXDgmu//IgOJTudrhP1JITrok YG1aB8ZtQP7yRtP3m+ogEwBcF4CKDDybUJkYtL7MKULedbQcEz0yCWdLxE6gOm0pmtIlbg AXDfRrUrhQLuL732pQLGRdld7uJ+Wa4= Date: Tue, 09 Jun 2026 19:02:25 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "Gladyshev Ilya" Message-ID: <1b6509a832dba9a7e24ddcdc23fb75247b267c78@linux.dev> TLS-Required: No Subject: Re: [PATCH v4 0/2] mm: improve folio refcount scalability To: "Andrew Morton" Cc: 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, pfalcato@suse.de, kirill@shutemov.name, ilya.gladyshev@linux.dev In-Reply-To: <20260608154734.8e4115fde4e2e14a3b6892fb@linux-foundation.org> References: <20260608154734.8e4115fde4e2e14a3b6892fb@linux-foundation.org> X-Migadu-Flow: FLOW_OUT >=20 >=20On Mon, 08 Jun 2026 21:53:01 +0000 "Gladyshev Ilya" wrote: >=20 >=20>=20 >=20> This patch optimizes small file read performance and overall folio = refcount > > scalability by refactoring page_ref_add_unless [core of folio_try_ge= t]. > > This is alternative approach to previous attempts to fix small read > > performance by avoiding refcount bumps [1][2]. > >=20 >=20Thanks. Nice numbers. >=20 >=20AI review had some things to say: > https://sashiko.dev/#/patchset/df26082871b4c65b2bd38d409026237c0857283= 6@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.