From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 024BC3E1226 for ; Thu, 2 Apr 2026 12:49:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775134190; cv=none; b=PG+zK5fQL4jCQ1fzXwWwR9gZKUOa8ddqqoCzZtlpEbI4Z5Q3VQgDvRuY61rzdiChbIu3FONlaY/hRnBD0tPnHlp4LmXjKu6oFXyUBMVxC+c61shlwv5N5EghY6QWvR8Aa8SKXzwMgBEndfpZ99bjcqswS7FW4XdmG++YV3xacM4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775134190; c=relaxed/simple; bh=AQgQvA8vXXArUs/621mgj1GltPRv9ZItkh6NsJMF34U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uYgdJJhHPWLHBYgD3b5S98uHD2q5iuLet+8KL4fCseSIeIT34g2UMvJg9jxQLgXkk90rREIJ2Jq08B1eNOTV5k2rUgBK07QGnoWR77NEld+X7lc2U3nPy3069wzeSC5W0ZTkU1LJ7ZGB9mL6lQbtM/vwmdPSJyAWLl7W3Adrnw4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=GofupbeK; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="GofupbeK" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=cF/GPU9r3ujDgxRZ2sbfYudvj0RzIpZembFDGNj7L60=; b=GofupbeK1lWQwxbg9iGzDlL/7l qo3ix734gZIrALLFw+o7cxCW1xN/TXBQ0xTHlT4sznqhs/qldCPqAoJr3Ypxx33FYPMiK6Hqknmzh J6Ud+auepjNFtWEfIKBN5zybxu4rWwOfjN3WaqCqb8oYfW2XpWGaauwu1XsldL6XCxNIGXAZ+vtl5 6Xc/q/fJDUU9z64qVqlJ35HZV+VD+fYo1/dA2udcdVdhJVlFhD4XPJFMCl3k02VPyIEhzx9xaRVVw f90uoYIjnEWDIOp+woBEnzzfYPFh5M8IGZCFT7i+273QhwJtkfWdfGkqQaM+Q86LBX+v/kL6kjEFd TpOeB7Kg==; Received: from willy by casper.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1w8HUM-0000000CJI0-3hHr; Thu, 02 Apr 2026 12:49:35 +0000 Date: Thu, 2 Apr 2026 13:49:34 +0100 From: Matthew Wilcox To: Breno Leitao Cc: Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kas@kernel.org, shakeel.butt@linux.dev, usama.arif@linux.dev, kernel-team@meta.com Subject: Re: [PATCH] mm/vmstat: spread vmstat_update requeue across the stat interval Message-ID: References: <20260401-vmstat-v1-1-b68ce4a35055@debian.org> 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: <20260401-vmstat-v1-1-b68ce4a35055@debian.org> On Wed, Apr 01, 2026 at 06:57:50AM -0700, Breno Leitao wrote: > vmstat_update uses round_jiffies_relative() when re-queuing itself, > which aligns all CPUs' timers to the same second boundary. When many > CPUs have pending PCP pages to drain, they all call decay_pcp_high() -> > free_pcppages_bulk() simultaneously, serializing on zone->lock and > hitting contention. > > Introduce vmstat_spread_delay() which distributes each CPU's > vmstat_update evenly across the stat interval instead of aligning them. But, uh, round_jiffies_relative() is _supposed_ to do that! Look at both the documentation and implementation. Why isn't it working?