From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A061FC6FA82 for ; Wed, 7 Sep 2022 20:43:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229955AbiIGUn0 (ORCPT ); Wed, 7 Sep 2022 16:43:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229902AbiIGUnX (ORCPT ); Wed, 7 Sep 2022 16:43:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5A1CC0B66 for ; Wed, 7 Sep 2022 13:43:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 42D7E61A4E for ; Wed, 7 Sep 2022 20:43:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1272EC433B5; Wed, 7 Sep 2022 20:43:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1662583401; bh=FRKdhXGWFNIp4ValMgTEBtAERy/TmsP1c+r60idMAtc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GCuThdvvW+ISBXwN7pYF3eReAOVwGG4l8qSRElZF8x/O8rzqjZYgy60xJPEFtQ8om DZlGkg5Ynq01RnKTVK2SGLXF4JXtOcdTfvuWUeMvp4/BCPUN9JC9eT3FCGiaTIw9Yl lJwGXZ+YPsdqdsvTt9TiNPm9qou3MbrvAkcGLtp4= Date: Wed, 7 Sep 2022 13:43:20 -0700 From: Andrew Morton To: "Sun, Jiebin" Cc: Tim Chen , Shakeel Butt , vasily.averin@linux.dev, Dennis Zhou , Tejun Heo , Christoph Lameter , "Eric W. Biederman" , Alexey Gladkov , Manfred Spraul , alexander.mikhalitsyn@virtuozzo.com, Linux MM , LKML , "Chen, Tim C" , Feng Tang , Huang Ying , tianyou.li@intel.com, wangyang.guo@intel.com Subject: Re: [PATCH] ipc/msg.c: mitigate the lock contention with percpu counter Message-Id: <20220907134320.01d1693387bde4af5d3100fb@linux-foundation.org> In-Reply-To: References: <20220902152243.479592-1-jiebin.sun@intel.com> <048517e7f95aa8460cd47a169f3dfbd8e9b70d5c.camel@linux.intel.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; 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 Wed, 7 Sep 2022 17:39:47 +0800 "Sun, Jiebin" wrote: > I have sent out the patch v4 which use percpu_counter_add_batch. If we use > a tuned large batch size (1024), Oh. Why not simply use a batch size of INT_MAX? > the performance gain is 3.17x (patch v4) > vs 3.38x (patch v3) previously in stress-ng -- message. It still has > significant performance improvement and also good balance between > performance gain and overflow issue.