Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5136913yba; Wed, 10 Apr 2019 12:10:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqw2KKVbsISQz4ZtEbj6+86FNOAXNLjJEDIQnJjsgGB9zP2aQMVmdxwH/LEth9iqiADAZIl0 X-Received: by 2002:a62:ab13:: with SMTP id p19mr45958556pff.131.1554923416711; Wed, 10 Apr 2019 12:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554923416; cv=none; d=google.com; s=arc-20160816; b=D/Gu6j9kx0VM5RTfFgYfPKpDePAxsR1uACnInIHW+810tcvbFisNkQM3TW2IqVpoEJ Dhp4bJkeCxg/Cxirv27rr4/C7QDsau9/+jYgDkzce0NMMlF/Xa0rGe9e089r533TbGCl EiANgVGlUuWRz6AZm5mM7U+CL0Geq3dWX/HwfuKsXvXgCO2kM3gE6xpFGTm24ZFHKKN7 DqY3XQomdpF0DC7Tg4HjRYetLgBSoOG1GgB+XbsxPkinE3UHUnKqfJjX3XKmiGNGdPMV HrFR/Cun1MrVEHeIi1ZS4DklOmkT10daNg3xCyc2ofdqfLOJ8HaScCL+7zi0CcjsVsWx KDig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=0jsJp//eJ8nBh3OxQ/S8L9ymOCU1ai928Muba+4H2no=; b=v1a1IAw0xxo/T9Ao36pAqnx3os6/ke3jwlnfddOafY19PqS2kpAyXs8qKs+SH1s1/7 8+bs3hOZX+fTC26ZSYwr6XgJIDdth7qBQZreYPeW1OooCklVdUONyA5SEJGNnb5scTOj YuLVXNPK/KNN6e2tPJT0zI/7ytjOsynY8DXt0aI9BX6gXzYwDf4aT4M1MH6piAyrF6vK DJjoy8FnYSrvr+i59Bbg6AxecvCHQ8HBgfeDbdIx5tHaXPZT3UyzUY9Dor8233OgkBnb DAdk0g9romwSRumS+A8Pd8FAEF4JgI/cnESYzJ/tlq2Wu3xRkPUO5zUIZEQC5fVmG4G9 Nl0A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u18si26051950plq.184.2019.04.10.12.10.00; Wed, 10 Apr 2019 12:10:16 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731567AbfDJSiW (ORCPT + 99 others); Wed, 10 Apr 2019 14:38:22 -0400 Received: from mx2.suse.de ([195.135.220.15]:38110 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728731AbfDJSiW (ORCPT ); Wed, 10 Apr 2019 14:38:22 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 02F76AC3B; Wed, 10 Apr 2019 18:38:20 +0000 (UTC) Date: Wed, 10 Apr 2019 11:38:13 -0700 From: Davidlohr Bueso To: Waiman Long Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org, Linus Torvalds , Tim Chen Subject: Re: [PATCH-tip v2 03/12] locking/rwsem: Remove rwsem_wake() wakeup optimization Message-ID: <20190410183813.n4sybugomkn53gvu@linux-r8p5> References: <20190405192115.17416-1-longman@redhat.com> <20190405192115.17416-4-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190405192115.17416-4-longman@redhat.com> User-Agent: NeoMutt/20180323 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 05 Apr 2019, Waiman Long wrote: >With the commit 59aabfc7e959 ("locking/rwsem: Reduce spinlock contention >in wakeup after up_read()/up_write()"), the rwsem_wake() forgoes doing >a wakeup if the wait_lock cannot be directly acquired and an optimistic >spinning locker is present. This can help performance by avoiding >spinning on the wait_lock when it is contended. > >With the later commit 133e89ef5ef3 ("locking/rwsem: Enable lockless >waiter wakeup(s)"), the performance advantage of the above optimization >diminishes as the average wait_lock hold time become much shorter. > >By supporting rwsem lock handoff, we can no longer relies on the fact >that the presence of an optimistic spinning locker will ensure that the >lock will be acquired by a task soon. This can lead to missed wakeup >and application hang. So the commit 59aabfc7e959 ("locking/rwsem: >Reduce spinlock contention in wakeup after up_read()/up_write()") >will have to be reverted. > >Signed-off-by: Waiman Long >--- > kernel/locking/rwsem-xadd.c | 74 ------------------------------------- I very much like removing this code. It was rather crazy.