Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2791652imu; Thu, 29 Nov 2018 10:15:30 -0800 (PST) X-Google-Smtp-Source: AFSGD/W+is7XDLkhTImpJx+Dgbc2wlaSvuYtCNGGYAZNiJs5V02pnNuF6GJQZINWjlJvHYnIGian X-Received: by 2002:a17:902:14b:: with SMTP id 69mr2546736plb.52.1543515330722; Thu, 29 Nov 2018 10:15:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543515330; cv=none; d=google.com; s=arc-20160816; b=PzM/LgQf0VK/We/10ryH94q1wdLB8f+51z566VXeiutwsbD8EYjpqmfd6WeqgOP3sq HTTjljo38nzaH9TSAU4oknef7RKu4nWkUbsmicgSLn8lMhHOG1nF5zblo3u5zkH69Dcx ioU3vjij4a5Kz4QAm2yHK1WQU9v4J4x8njYHT7YRf+B7l6Wc3YUY4eZjvSk8tr2FENmi h76sfc7hoAm+Y7/DqAw1w5Zy+HSYkDYo0rIiCNydu+y5Qyb9aqrVgMUp5RTMO/D163N/ BU5j/fBcPNISoCP+YsJfRk3yQUQ3FoyRe0ZfmVlkluEY9oyP2/ph+h6ybhA5nLu0eTQm ISjQ== 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:dkim-signature; bh=0HEU5J2Qf78Xp8NdP3inc4RVXCKDIY45GBCgQX2P4XE=; b=tn4/GsHII85xFVKH57ZLuobWFYNiyz+JeGPjxn1lB0gxI/RigOVS2+918r/e40btbp 3tG7yXMesvcLMZe6+gVqsBpHmx7ASi8xKYLFiurNQuNs22PWpe4+qhFUMi4d6dQ0kulx SqOmnNiHAN4nRUbECBZz+2Qnrrn40tZ1tTj16Kk/444vjjFCDpAz70JyXlgiFFt9m2IX va3YebA1/M63ltNIcPKdjXqQGJ+8PnBdYotd6eOvQqZgKhZtizY0iXZF0i72ANrwfZ4B rjZPtka4ckX5/DWjdT+52ashQI+99CGSB8ix5Dwi0cHO9DeeMoq5kjm+LSXTDp7MyH8z O/jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=PPfCHTUO; 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 y7si2501937plk.275.2018.11.29.10.15.08; Thu, 29 Nov 2018 10:15:30 -0800 (PST) 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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=PPfCHTUO; 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 S1727540AbeK3FTk (ORCPT + 99 others); Fri, 30 Nov 2018 00:19:40 -0500 Received: from merlin.infradead.org ([205.233.59.134]:51928 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725928AbeK3FTk (ORCPT ); Fri, 30 Nov 2018 00:19:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0HEU5J2Qf78Xp8NdP3inc4RVXCKDIY45GBCgQX2P4XE=; b=PPfCHTUOR2KlyKrsAEQcVhZPU eQ1He9vqP1qhM7VrqZw12MB6bRBKUN00TDNImUuVvIqQNatvzCzi0sKhlmFxQTa0Rsd9MZG3/itU1 1h6OwcTgJZqReyJix5ox2n2Y1YdRvFdw8UGAqv/sAu1SIVtkXfSGGZSudRmwSDAQOH6jHI4nmKeKJ CVQ/xNX1X9BN01igBNZUx6p4INCvYun1kjorREwcZJMaF9lbL160qh82p/KQcwOh+H+uQN5kwweZn bTOxfCgRBm78yyrBjBVEJDi/GJr79hlasXoh8EUN4fuUIUKeS+Pp06u0X0Hl0U/bwGdccN8vZShdv 1jM/qGZlg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSQoM-0004Nm-Vh; Thu, 29 Nov 2018 18:13:15 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 67EB12029FD58; Thu, 29 Nov 2018 19:13:12 +0100 (CET) Date: Thu, 29 Nov 2018 19:13:12 +0100 From: Peter Zijlstra To: Waiman Long Cc: Yongji Xie , mingo@redhat.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, xieyongji@baidu.com, zhangyu31@baidu.com, liuqi16@baidu.com, yuanlinsi01@baidu.com, nixun@baidu.com, lilin24@baidu.com, Davidlohr Bueso Subject: Re: [RFC] locking/rwsem: Avoid issuing wakeup before setting the reader waiter to nil Message-ID: <20181129181312.GC11632@hirez.programming.kicks-ass.net> References: <1543495830-2644-1-git-send-email-xieyongji@baidu.com> <20181129131232.GN2131@hirez.programming.kicks-ass.net> <5598cd71-c3c8-d6ef-eb30-777cf901a2ef@redhat.com> <20181129160627.GU2131@hirez.programming.kicks-ass.net> <8cc45695-b325-a219-8b46-d5da6ddfdd63@redhat.com> <20181129172700.GA11632@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 29, 2018 at 12:58:26PM -0500, Waiman Long wrote: > OK, you convinced me. However, that can still lead to anonymous wakeups > that can be problematic if it happens in certain places. Should we try > to reduce anonymous wakeup as much as possible? No, we should at all times accept and expect spurious wakeups.