Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7617432pxb; Thu, 18 Feb 2021 15:19:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLkz0H1mZtBsm19k+LTd7HS2d7EMN2z15zaSpL/WlNru86bNOjN0jSSSZgsYdF9lV/Gr5R X-Received: by 2002:a17:907:728b:: with SMTP id dt11mr6139615ejc.321.1613690370732; Thu, 18 Feb 2021 15:19:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613690370; cv=none; d=google.com; s=arc-20160816; b=EO+EDPqsuCU1dD6WJ7i3pJpR5eMLXFUU/F5WlO1SZd6tsChWuahqQI5ScHb9VLiWzm v9A6/PDJR5X2K4RvAXetV7Dk7sGoeXVv55PB5QGhyuxoR5W2O2k33xMcKpDq9+VLNeor D1Scekr96srVmSX3xmuadZcxW6nBYF3YLjCSl+w1d1hyP8TkAYpuRAO2RsoUoEixCvNd ZGpI8B+XaHAD+97Z8X+dStQKwkzs6F36O342wsXBxjySOquTSIMmt2eo9Sduuv9e4QrK A4SOXS9+XIxhFJSkB81KQWT5TP7NjoEm5q3LCK7SyVWzjGEYGU+xvQQQPwPljitiUsqy V8xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=eoEJFYlnj/AFNV3ZQb5bMYmBcVWlKOV4k09v7o+fwq0=; b=hg0UgPzY9KBvoF+FwCcKScEsdkFKuR8laKsj0Z29Aeo3N64bwDz4xb9vqEYgb8CVql bjFc95VPBG6Ht/0rocMoXcFCj0U7Qjcv5ILgMk935w62+SfiOANS67X3SFei9jJo6cNR fhEfX27cQbke3iPUnqXUK/tHmDRCIR24aLAwN+mKmHt5YeXqrjGqcUzWhvv9nZHwYfQA V6K+/Ux6YAhAuw1kpKSNISvQwpnt3Ck6jqh0ohDqalseKyPZG2g10Cv8nnx4EKQqNzgJ BmaKXeIDOT9fc3sTWrpfBtyenN5rvvrcUny+5Qfw3pD/qeswJQOV/KKTR0j/3ODEX90X Y71A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="Ue/bdei1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r4si5619956edi.177.2021.02.18.15.19.05; Thu, 18 Feb 2021 15:19:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="Ue/bdei1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229802AbhBRXR1 (ORCPT + 99 others); Thu, 18 Feb 2021 18:17:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:43584 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229652AbhBRXR0 (ORCPT ); Thu, 18 Feb 2021 18:17:26 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 82FD164EB9; Thu, 18 Feb 2021 23:16:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1613690205; bh=VuEQvhYrUQRk+2hwk6NOio3v4yKDWE3Dxa3E4sAhabU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Ue/bdei15LxfCoVUnsg10eEKBppOUxhEAviiZH5iGhrO//dPBrsp6A0q3vlwaIjeI h2Lenw3NHaPNJnbr/Qpk8XVt4eDLwXlo3EuN7JixwIs2jHPN0fat7hd9qypnGWDg80 w1fLwCIq1HbJrwFa8RLrokUcLm9rQGsX3tZTW/NY= Date: Thu, 18 Feb 2021 15:16:44 -0800 From: Andrew Morton To: Jens Axboe Cc: "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] percpu_counter: increase batch count Message-Id: <20210218151644.df430e4f77f763b7db2a004f@linux-foundation.org> In-Reply-To: <0bf90e07-8758-b238-b3f3-a330725a1134@kernel.dk> References: <0bf90e07-8758-b238-b3f3-a330725a1134@kernel.dk> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 Feb 2021 14:36:31 -0700 Jens Axboe wrote: > Currently we cap the batch count at max(32, 2*nr_online_cpus), which these > days is kind of silly as systems have gotten much bigger than in 2009 when > this heuristic was introduced. > > Bump it to capping it at 256 instead. This has a noticeable improvement > for certain io_uring workloads, as io_uring tracks per-task inflight count > using percpu counters. > It will also make percpu_counter_read() and percpu_counter_read_positive() more inaccurate than at present. Any effects from this will take a while to discover. But yes, worth trying - I'll add it to the post-rc1 pile.