Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2696536pxb; Sun, 24 Apr 2022 23:43:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6PW+Hlwfaq099OYE8lp9ghCLuH50OyuBgGbu8wW8jZxEdaycsidzWRLeI6arJuYxZRtHo X-Received: by 2002:a05:6402:1941:b0:413:2b80:b245 with SMTP id f1-20020a056402194100b004132b80b245mr17357459edz.252.1650868996913; Sun, 24 Apr 2022 23:43:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650868996; cv=none; d=google.com; s=arc-20160816; b=VJZOn30Pz8l14phafHHLRJ5gnD5SAN3VJV8j4G2flosTt2IJ7l1RcDjFtuUA4p9JLl vdC1c9ogtIwP668SeyT1HA4Zt9B6U3Akco1dBex/j5K/OPF0St5idYXO2dECmDtd0F29 Q61tdpxeZzv3tMQqGHhJRLTTXXash2/mCFrHw1YjOKR0ht7ByLeknRxZyh48Iz+IfuJa LGehmvi5BCvWwcHKYaWxDyMbECheXvUbOrkROmdmGKecsr5xFqebsvm/+v1tWw2K4iKe ehoQ+TccMLbLgSJyimTLJL4jMb6buHSc+BeRjZdxAkZaBznAadbAfoQlfo2iJ7tEfSDG nfsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:date:message-id:from:references:cc:to :dkim-signature:subject; bh=gLLGzwk8fcXEWz+exNqSl7CbwMy3y1DnQlR3cQo6pOM=; b=zBA8Y9XcdEoVyRwzUw/w8QNvU6f7jhdaGt0l+bdSLGtwlp1AmYkWVLY8lDP/buhp0H wXC6/z6QA4ISSlCTBbiKieM5eTEwNeBlfspg9mB76M/GL6k1wSAk+EfOhiPLzFPWUHn1 n1JFihvBfDQ+MDD/eKqo/mhfQoLY14GUksbdb6usVHv5/0RZoIAVNyrZnYub5jk/tbsi hHQTd3Y2/769XpQdQAO9UHEKaVXFtjGfZs+s7f7ZInM6maus3G7Dk7l5Fscno5I+mmOl BCtwnudrNGVJoxNu4Cft6uFq1r+xZogEdrcshxnvVJuP+17KSrfoPIwF5aszJCxnoDUj QF7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=kxd5j0CD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w13-20020a170907270d00b006e06d4769f3si2694599ejk.692.2022.04.24.23.42.53; Sun, 24 Apr 2022 23:43:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=kxd5j0CD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238624AbiDXID2 (ORCPT + 99 others); Sun, 24 Apr 2022 04:03:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236822AbiDXID1 (ORCPT ); Sun, 24 Apr 2022 04:03:27 -0400 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28F8B3524B; Sun, 24 Apr 2022 01:00:27 -0700 (PDT) Subject: Re: [PATCH v2 00/12] Improve Raid5 Lock Contention DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1650787222; 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=gLLGzwk8fcXEWz+exNqSl7CbwMy3y1DnQlR3cQo6pOM=; b=kxd5j0CDABqAmfdF5I1+eE0CSu2jldOESNMCBSr5p2ePClJy+932zJZLSSyYPFhc8RpLLH sDVHG4pYUhd2jvjUF+y3sybLkSQgSooy1HP0Wi9/GzARheb7uyTNX1CDttD7pFpbkWFBIF UVXImihoFCh2w4CJNBGWmxXLUxg/kXI= To: Logan Gunthorpe , Xiao Ni Cc: open list , linux-raid , Song Liu , Christoph Hellwig , Stephen Bates , Martin Oliveira , David Sloan References: <20220420195425.34911-1-logang@deltatee.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Guoqing Jiang Message-ID: <4094aed9-d22d-d14f-07a7-5abe599beeab@linux.dev> Date: Sun, 24 Apr 2022 16:00:15 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/22/22 12:02 AM, Logan Gunthorpe wrote: > > On 2022-04-21 02:45, Xiao Ni wrote: >> Could you share the commands to get the test result (lock contention >> and performance)? > Sure. The performance we were focused on was large block writes. So we > setup raid5 instances with varying number of disks and ran the following > fio script directly on the drive. > > [simple] > filename=/dev/md0 > ioengine=libaio > rw=write > direct=1 > size=8G > blocksize=2m > iodepth=16 > runtime=30s > time_based=1 > offset_increment=8G > numjobs=12 >  > (We also played around with tuning this but didn't find substantial > changes once the bottleneck was hit) Nice, I suppose other IO patterns keep the same performance as before. > We tuned md with parameters like: > > echo 4 > /sys/block/md0/md/group_thread_cnt > echo 8192 > /sys/block/md0/md/stripe_cache_size > > For lock contention stats, we just used lockstat[1]; roughly like: > > echo 1 > /proc/sys/kernel/lock_stat > fio test.fio > echo 0 > /proc/sys/kernel/lock_stat > cat /proc/lock_stat > > And compared the before and after. Thanks for your effort, besides the performance test, please try to run mdadm test suites to avoid regression. Thanks, Guoqing