Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp524544pxk; Wed, 2 Sep 2020 07:59:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyT4keB0fn2nElkVtX9fub/S34XnAEzpPXQ59fENy22GPx8Q4Tt0kdaMwhFb4UyXOQ5KXbS X-Received: by 2002:a50:fb0e:: with SMTP id d14mr513182edq.172.1599058754965; Wed, 02 Sep 2020 07:59:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599058754; cv=none; d=google.com; s=arc-20160816; b=OqYDQbKIzm9M1tkyCGEH72HeW0B/w5UiJVL2lR2QO6jziYcjhK1Ettw1XcaMdQTVt0 LbXakXQycfiMumkx1IEp10Q1P+TO3bedtEeMjMe4FoZ4Nq+V91JBDorLj0J8RCLVSsGF hDs5yQs76BOiOwJrF4/3+InBoGU6QhilKTCAkZx/R5jXkV7IWYWYrG61cBd8cmA9opLl kt6OiTFQrwvXsX0r0PG8MxZEJ3Xye7cHmiKgs9CJOql8HXfqS+sPW1ocHHzQamIIKT1D J60j7Du3dV4yZQTzA+bJGDhG7kI+Q8s34X9/MWz7urKiIVHzBzGRX0RUJBBvjxJo/hrT /ZWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=lDkSul+1X+RjRffnEyrjfRLNLhJmksxTsX1AB+/HFZE=; b=tCZp4o9oIQgVr41wSmm1U7i9KNJUAcWCeoVSm9MUqQLolMo3OX1AYlalKTb265UcfR 1+vLP0T9Qeqv0N6E/FbSdpfCMGc9F7r8d4rjEcaXIUPofeYnyTaeTYOipCI8nUYOGI7D CA45OuoVZEEUaLcR+okIBLDsGpoBDyjUeEcigWb1xA7N54nfSJegwa4Bg1g26Xb39wkH YsnIMj/pZMb/9NLSK8hDZkaO6LWXmS210fMeoH5/apLYqD1fwSQOIUtOblAMGoJEE87s P70PhzKlI6ctFZ0N4TqEnwH4GpHq8ok+4DcSoaQcqJQpJG/M6oqSGVWWD/B3/01b2e/s JebA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=DGna4WEY; 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 ay17si2859557ejb.345.2020.09.02.07.58.51; Wed, 02 Sep 2020 07:59:14 -0700 (PDT) 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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=DGna4WEY; 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 S1727884AbgIBOuF (ORCPT + 99 others); Wed, 2 Sep 2020 10:50:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727080AbgIBOCd (ORCPT ); Wed, 2 Sep 2020 10:02:33 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4874EC061245 for ; Wed, 2 Sep 2020 07:02:33 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id m23so5868500iol.8 for ; Wed, 02 Sep 2020 07:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=lDkSul+1X+RjRffnEyrjfRLNLhJmksxTsX1AB+/HFZE=; b=DGna4WEYAKm+GxbC4EXVOI19nH3MAqxS8oOklLe6cjf0oCUQy3fZdZnuRNDEm2ryHs 4H5pMhYr4q+E31tMFwXx3mGgCMp5FeiLWVzU4oGfFUdZeAxsZ/yAv2H8hd4Q7MlOv9Ir 9sVmDlzAp9L7waqE7Mjll9U7E3m7VvNDmcbHGSdv5UBvLlBOUpccX9IobYDxb36t0oBS 7/2qcWRfI/DMC3rMFxRfBSQl3yUkMyar18BijK6EWrxdNKnPHtEIdnOZSidxFJyUDn5n gYbGtwYZSogDRv8CnOeKbnuxJy63+EHDxcoUBqqjeQRLKAdASi+x8Uj9+vOj3bHj6bgx qQgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=lDkSul+1X+RjRffnEyrjfRLNLhJmksxTsX1AB+/HFZE=; b=L/iAbfhVaW24Nsf4QWPEFOg0PoHUouFjb2t2LAATNqVSJcLxmcs/7vdd0HXi7cosB4 y5PubiE4c3VV4ir83dG6Hd7CluAtDIawvqMzCzvh55VkYm3Ri3IDNsu696LG1YpDG5wH boHBovdwCkK+ufJSE6A8glDBOOdaUFYEQyCuKhKWv0X++lBflAebkdYZgHRiiWZxRP6M 2A6twaBbQBDgvhat7F6qdBaRI6yYfYGLYv7HekO/XM1kY0kIbKdcQHL6rSmYf1lKJ5j5 PicmvGa2Wb0/D0Z4O91ic4L+PCclev4RVhxzHgqI+Gqa27LmZ8JsyvpnXTHzQIeeIgc8 ljQg== X-Gm-Message-State: AOAM532J3MecDYfRA5F8TAO3aLvf3zeJ/OK2U5L6ZhSFUDNwFfg45pVO kGu9B5e/tU+0JCfOUbZkI8NAVw== X-Received: by 2002:a6b:5804:: with SMTP id m4mr3053243iob.14.1599055352059; Wed, 02 Sep 2020 07:02:32 -0700 (PDT) Received: from [192.168.1.57] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id z10sm2037885ioi.13.2020.09.02.07.02.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Sep 2020 07:02:31 -0700 (PDT) Subject: Re: [PATCH V2 0/2] percpu_ref & block: reduce memory footprint of percpu_ref in fast path To: Ming Lei , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Cc: Sagi Grimberg , Tejun Heo , Christoph Hellwig , Bart Van Assche References: <20200902122643.634143-1-ming.lei@redhat.com> From: Jens Axboe Message-ID: <4ce7b53b-2c42-3814-fa0a-5324aca6aae0@kernel.dk> Date: Wed, 2 Sep 2020 08:02:30 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200902122643.634143-1-ming.lei@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/2/20 6:26 AM, Ming Lei wrote: > Hi, > > The 1st patch removes memory footprint of percpu_ref in fast path > from 7 words to 2 words, since it is often used in fast path and > embedded in user struct. > > The 2nd patch moves .q_usage_counter to 1st cacheline of > 'request_queue'. > > Simple test on null_blk shows ~2% IOPS boost on one 16cores(two threads > per core) machine, dual socket/numa. > > V2: > - pass 'gfp' to kzalloc() for fixing block/027 failure reported by > kernel test robot > - protect percpu_ref_is_zero() with destroying percpu-refcount by > spin lock > > Ming Lei (2): > percpu_ref: reduce memory footprint of percpu_ref in fast path > block: move 'q_usage_counter' into front of 'request_queue' Applied, thanks. -- Jens Axboe