Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5726127ybi; Tue, 4 Jun 2019 11:06:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7x6LtohMhQqqPvDNO7qhXETmcuhl9J0ecKmWz+NTInW3DbISP0zdHwhyGOaetlImQQms/ X-Received: by 2002:a62:5b81:: with SMTP id p123mr40308248pfb.158.1559671596132; Tue, 04 Jun 2019 11:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559671596; cv=none; d=google.com; s=arc-20160816; b=EddUTHxr3pswKHSv2sb6sjjUM5nKt6Y6iZ6aVhDIaGOHH4V+p8lyDIi8yu4LfBQO1I ID0S5JDDlwfNJIEqk0ubGo3UK+L2+oKFw96QS1NSmbqtrIPNE9NWwkKL6C8l87bh0PiF p5SJQFhLcomNqCdKEV8wGBJr4ptamU+BDxvDLPXprlzCxfu5G5uwSBeh+y0zsZbmrB+e udknrQpRW3YoDjLNneItZUekiYoXG63dD9dN0Cl0zRYyJDg/JXPHC+SH2FJEVidO9YrY 9Argr4PNcLBObxZM5ZbLbB7ZI6vzZzIWAGN+3Ml6IKY5Gk5nlv7U7yvKoyhoYyUJZk4V 8H1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=lIz08ac0Q/QV9nHwzA6WiaL9B5GyKy+n7YbYo16mF1E=; b=uTifL+g8h57O2w3wGsZsVvpbqlivG7JdzNLw4V+TBdTnVcILkMW6cXHnWA6g8KBNn9 vcaWUPLYf2i93RA/xBeubdnF9BuMEvpjZP57hwRA+kR00y28t+UAmIuklCzIa93aOJby hQcQJdnnkh138Pt3Bfcjm2H3T93f/HOOknGNw+xLZxnjHqTdHZyzoVHxEMzcaiP6walK ZfF6HXTlV5JPxDAkvF5ooC8jvh+6SWjZ54OBSRTP1da879+Wxi027Omch2AfQoGdrLnc fLG8mybITod2Dato5p81+zROVtUqToPqU4ffU1LDFfnBa+9ZpvTXo4/3KD48QmThUiLa igAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62si23036066pgb.562.2019.06.04.11.05.59; Tue, 04 Jun 2019 11:06:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726490AbfFDSEj (ORCPT + 99 others); Tue, 4 Jun 2019 14:04:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50368 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726238AbfFDSEj (ORCPT ); Tue, 4 Jun 2019 14:04:39 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 93F243162904; Tue, 4 Jun 2019 18:04:38 +0000 (UTC) Received: from llong.remote.csb (dhcp-17-85.bos.redhat.com [10.18.17.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1ECBB87D3; Tue, 4 Jun 2019 18:04:35 +0000 (UTC) Subject: Re: [PATCH v8 15/19] locking/rwsem: Adaptive disabling of reader optimistic spinning To: Peter Zijlstra Cc: Ingo Molnar , Will Deacon , Thomas Gleixner , Borislav Petkov , "H. Peter Anvin" , linux-kernel@vger.kernel.org, x86@kernel.org, Davidlohr Bueso , Linus Torvalds , Tim Chen , huang ying References: <20190520205918.22251-1-longman@redhat.com> <20190520205918.22251-16-longman@redhat.com> <20190604092008.GJ3402@hirez.programming.kicks-ass.net> <8e7d19ea-f2e6-f441-6ab9-cbff6d96589c@redhat.com> <20190604173853.GG3419@hirez.programming.kicks-ass.net> From: Waiman Long Organization: Red Hat Message-ID: Date: Tue, 4 Jun 2019 14:04:34 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190604173853.GG3419@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 04 Jun 2019 18:04:38 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/4/19 1:38 PM, Peter Zijlstra wrote: > On Tue, Jun 04, 2019 at 01:30:00PM -0400, Waiman Long wrote: >>> That's somewhat inconsistent wrt the type. I'll make it unsigned long, >>> as that is what makes most sense, given there's a pointer inside. >> Thank for spotting that, I will fix it. > I fixed a whole bunch of them; please find the modified patches here: > > https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/log/?h=locking/core Thanks for reviewing the patches. So how do you think about the overall state of this patchset? Do you think it is mature enough to go into 5.3? Or if you want more time to think about solving the RT thread issue, we can merge just patches 1-16 and play with the last threes for some more time. I am fine with that too as improving RT tasks is not my main focus. I like patch 16 as it led me to discover the rwsem reader wakeup bug as I hit the negative dentry count WARN_ON message in my testing. I worked on this owner merging patch mainly to alleviate the need to use cmpxchg for reader lock. cmpxchg_double() is certainly one possible solution though it won't work on older CPUs. We can have a config option to use cmpxchg_double as it may increase the size of other structures that embedded rwsem and impose additional alignment constraint. Cheers, Longman