From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752680AbdJKU5j convert rfc822-to-8bit (ORCPT ); Wed, 11 Oct 2017 16:57:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39326 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751906AbdJKU5f (ORCPT ); Wed, 11 Oct 2017 16:57:35 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 39FE5C059B63 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=longman@redhat.com Subject: Re: [PATCH v6 00/11] locking/rwsem: Rework rwsem-xadd & enable new rwsem features To: Dave Chinner Cc: Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, x86@kernel.org, linux-alpha@vger.kernel.org, linux-ia64@vger.kernel.org, linux-s390@vger.kernel.org, linux-arch@vger.kernel.org, Davidlohr Bueso References: <1507744922-15196-1-git-send-email-longman@redhat.com> <20171011205033.GK15067@dastard> From: Waiman Long Organization: Red Hat Message-ID: Date: Wed, 11 Oct 2017 16:57:33 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20171011205033.GK15067@dastard> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 11 Oct 2017 20:57:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/11/2017 04:50 PM, Dave Chinner wrote: > On Wed, Oct 11, 2017 at 02:01:51PM -0400, Waiman Long wrote: >> In term of rwsem performance, a rwsem microbenchmark and fio randrw >> test with a xfs filesystem on a ramdisk were used to verify the >> performance changes due to these patches. Both tests were run on a >> 2-socket, 40-core Gold 6148 system. The rwsem microbenchmark (1:1 >> reader/writer ratio) has short critical section while the fio randrw >> test has long critical section (4k read/write). >> >> The following table shows the performance of the rwsem microbenchmark >> and fio radrw test with different number of patches applied on 4.14 >> based kernels: >> >> # of Patches Locking Rate FIO Bandwidth FIO Bandwidth >> Applied 40 threads 32 threads 16 threads >> ------------ ------------ ------------- ------------- >> 0 38.7 kop/s 706 MB/s 704 MB/s >> 7 38.6 kop/s 668 MB/s 663 MB/s >> 8 38.9 kop/s 704 MB/s 701 MB/s >> 9 39.1 kop/s 702 MB/s 707 MB/s >> 11 3218.0 kop/s 2594 MB/s 2614 MB/s >> >> So this patchset improves mixed read/write rwsem microbench by 83X >> and randrw fio bandwidth by about 3.7X. > Overall improvement in bandwidth is not necessarily a good thing - > this could simply demonstrate total write bandwidth starvation and > so it's only reporting read bandwith. It's much more important to > look at the change in read bandwidth vs write bandwidth in the fio > test. i.e. exactly how did the IO balance change as a result of > changing the locking bias? Thanks for the input. I can take out the reader lock stealing part. That will give it a more fair reader/writer bias. It can also be an option that be set when the rwsem is inited. Cheers, Longman