Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1607636ybh; Thu, 23 Jul 2020 13:14:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtsr2sWHaD6FjmcWkfGL3MFC6a5B8tqROA0QYZFONraaTkToxit9WZJkctkFZRG8tol92j X-Received: by 2002:a17:906:7c8:: with SMTP id m8mr5911431ejc.527.1595535268006; Thu, 23 Jul 2020 13:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595535268; cv=none; d=google.com; s=arc-20160816; b=LxOBtK1jPKXUD6JpB08vcMQ/uBhQOKgRfeOubdWdvF3BWLuCVlBlDbAEUzBpZoiqQS SHZtzir8v3+zSwRd+lF7Hs+wJvp0Rko0dc+phI3in1VwqBoKiomDEJvp3bCS8QbW+t89 39a0aItlIc2kQ/nwAvD979uK9HZVtHMEFytBqUReTui2ccVcrJjEV/bGRn6p1lQquPLS WUNLjgZoTArc4FFTs7nFC22X9/mFd6jYQ3uTwdl86DVhlPvdBjsmQNpLTY15SV8qTkyi h4scvPl46zIun1NstF/DOROYCV3yFNv4vMkLQoNhmdN6V5J9YgCk4Xj3QF7Cumqju+Q2 XzIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=/rj5UU6tGdG+2asVe5JXVTkUwXIGY3WdZ5un4JY8Vf4=; b=UsFJo9NsTGNww6czAkbSVGwRcypprZ4+ZqHOFF4XD3nqBZERdfifnoVGZg2ISZlv+H brO7nZqojKWzKT7Ub4T+AaQYnkORRzv6dKAcy+SxUYLopMXlyfsmHcBGZgGzUNhK3s/Z cHT/gTb2rmF9+r6VFJmhh4qr+ADfI0Bt+vCKP6IYf9kkmCElL1UvJMCR9QiLon2wllWi CusJvkoNMFi8dpFH4B6UIpmDpJzdMJ5eawqHrWGgcpmPxtltmgfbKOoHtS3G76XireRO I+es/Wx8F/+b7Q1ZpFpoIuQC9VA0bcox/zLtQBvmUX+I6BgC8RzcZ4vGNhRrE+xf8GRf R+Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b="j/CHcoXS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a1si2509031edv.245.2020.07.23.13.14.04; Thu, 23 Jul 2020 13:14:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b="j/CHcoXS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726501AbgGWULx (ORCPT + 99 others); Thu, 23 Jul 2020 16:11:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725979AbgGWULx (ORCPT ); Thu, 23 Jul 2020 16:11:53 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5511AC0619DC for ; Thu, 23 Jul 2020 13:11:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=/rj5UU6tGdG+2asVe5JXVTkUwXIGY3WdZ5un4JY8Vf4=; b=j/CHcoXSsZZ0Um3pDllJCl9MsR GGrruV7XTpUCFhljY3hAACYerSw70BI1nrteXRuzYmY63g3OYylzPw2vhagDSjgwzbHBbm4qyXuPD F8QmY5mQoV+aZh7mQkCWm541BLB0CT7VwDLGhRqLngnzvO6cY1E4aetu8DL8iPtYAd+cGtucnMQWj 7HvgVtoIuiOkTrMoMYbnyeQdBxp+bVOyJoSPCjYFCuer22i4PBCx6j2qDmIzJO8gLZgF4kaLkvaMy +nnmu7Zoye+MzV4vxpR9lY8TShCypEK+hkDnUoAp9th09bkhYGQaHAKipKmYVQ4ddZ47as9sFqMkL VEctz0HQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyhYv-0000pD-Ou; Thu, 23 Jul 2020 20:11:30 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id DE673301A7A; Thu, 23 Jul 2020 22:11:28 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C4D49200F77CC; Thu, 23 Jul 2020 22:11:28 +0200 (CEST) Date: Thu, 23 Jul 2020 22:11:28 +0200 From: Peter Zijlstra To: Chris Wilson Cc: mingo@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, paulmck@kernel.org, frederic@kernel.org, torvalds@linux-foundation.org, hch@lst.de Subject: Re: [PATCH -v2 1/5] sched: Fix ttwu() race Message-ID: <20200723201128.GT10769@hirez.programming.kicks-ass.net> References: <20200622100122.477087977@infradead.org> <20200622100825.726200103@infradead.org> <159532854586.15672.5123219635720172265@build.alporthouse.com> <20200721113719.GI119549@hirez.programming.kicks-ass.net> <159541187604.15672.2433896906671712337@build.alporthouse.com> <20200723182841.GS10769@hirez.programming.kicks-ass.net> <159553326368.21069.3167204000119437062@build.alporthouse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <159553326368.21069.3167204000119437062@build.alporthouse.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 23, 2020 at 08:41:03PM +0100, Chris Wilson wrote: > I am very sorry for the wild goose chase. *phew*... all good then. I was starting to go a little ga-ga trying to make sense of things. Arguably we should probably do something like: @@ -4555,7 +4572,7 @@ asmlinkage __visible void __sched preempt_schedule_irq(void) int default_wake_function(wait_queue_entry_t *curr, unsigned mode, int wake_flags, void *key) { - return try_to_wake_up(curr->private, mode, wake_flags); + return try_to_wake_up(curr->private, mode, wake_flags & WF_SYNC); } EXPORT_SYMBOL(default_wake_function); Since I don't think anybody uses anything other than WF_SYNC, ever. And the rest of the WF_flags are used internally. Thanks Chris!