Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1744156ybn; Thu, 26 Sep 2019 01:20:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlJVhsji1dcFat7LHN7mJ1d+Q85jgizUB7p7Wtb39lJ8GRC35dF8xTxZ7xmQhIy3xRwWJ2 X-Received: by 2002:a50:eb93:: with SMTP id y19mr2232960edr.94.1569486011760; Thu, 26 Sep 2019 01:20:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569486011; cv=none; d=google.com; s=arc-20160816; b=fe//sHIt8CZq7GpIWOZv+6Rc3t0his0W18X3odJ6LPXrQaq1HoF7cznynOiSzqd8y5 qtbL/x9J3VcMWQq6BvX8SKlTDwj1SS83GhXakCR065qgGSWgELj1kwGPkRuXry8EpJ4S acizZGdo/sNRihHOnh6nzrQHnD0qsNN4muxMTVh4iMSxhP5DfqqSyFaexFST/TdA7v3C w6hQtAQJ9aIKhMTsz0h+TM/2JEK+4/ueOGL892JTcVtU/68E2CnyNV/ZjGzyCpJXKzff QrnjQzZbxpZhUr7c/Hb8Mwl6/06a+w84JkZ38vQBAEz5o0padqLEFdGEshwXapHHx9pJ m1yg== 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=ARrCB/RhkNk0cuGHNWW6dxzflHeAZ1Ebjoq28bAbzVk=; b=XW/Hyd70I8PrKHbvuNkp88f8p7pl8Tmr5yhpiAaoYnBRYt7azymityi2AAv6ebhxcA GdRa+X8POqeOQnhAzkyr+212/sJkUPBfojqluTZui/r9OOaWT394jG82iOIHGdm7r9jI ejaKc85RJp6fC7z6GF7lqqt/pu4lGg/bR+PkFMaxqr8ccUnRqPJvFSYhhjDO1yj9yJvA W33NfRSolBk/FmZ2Fs7u6wSFV5b6N5qG8PnDg89Ax1uHwQG2OkiDqgAsJMrnDyyi8MyM AIIeDet7PdZrJ/gNLbEBzhCzPOckJI0iIXtH81qq1CvUBRk+nR/pSgN9yjC2qTNCuV02 jBJA== 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 h26si841679edb.141.2019.09.26.01.19.47; Thu, 26 Sep 2019 01:20:11 -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 S2439107AbfIXQF6 (ORCPT + 99 others); Tue, 24 Sep 2019 12:05:58 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:34736 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438777AbfIXQF6 (ORCPT ); Tue, 24 Sep 2019 12:05:58 -0400 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1iCnK6-0006K0-L0; Tue, 24 Sep 2019 18:05:54 +0200 Date: Tue, 24 Sep 2019 18:05:54 +0200 From: Sebastian Andrzej Siewior To: Scott Wood Cc: linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org, "Paul E . McKenney" , Joel Fernandes , Thomas Gleixner , Steven Rostedt , Peter Zijlstra , Juri Lelli , Clark Williams Subject: Re: [PATCH RT v3 3/5] sched: migrate_dis/enable: Use rt_invol_sleep Message-ID: <20190924160554.5esplbmnzm4q4tew@linutronix.de> References: <20190911165729.11178-1-swood@redhat.com> <20190911165729.11178-4-swood@redhat.com> <20190917075943.qsaakyent4dxjkq4@linutronix.de> <779eddcc937941e65659a11b1867c6623a2c8890.camel@redhat.com> <404575720cf24765e66020f15ce75352f08a0ddb.camel@redhat.com> <20190923175233.yub32stn3xcwkaml@linutronix.de> <20190924112155.rxeyksetgqmer3pg@linutronix.de> <55dc19fcc44b2e658b71f68206306c8310335564.camel@redhat.com> <20190924152514.enzeuoo5a6o3mgqu@linutronix.de> <1a2234884e55e5ee6df5f32f828a99c1b248933f.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1a2234884e55e5ee6df5f32f828a99c1b248933f.camel@redhat.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-09-24 10:47:36 [-0500], Scott Wood wrote: > When the stop machine finishes it will do a wake_up_process() via > complete(). Since this does not pass WF_LOCK_SLEEPER, saved_state will be > cleared, and you'll have TASK_RUNNING when you get to other_func() and > schedule(), regardless of whether CPU1 sends wake_up() -- so this change > doesn't actually accomplish anything. True, I completely missed that part. > While as noted in the other thread I don't think these spurious wakeups are > a huge problem, we could avoid them by doing stop_one_cpu_nowait() and then > schedule() without messing with task state. Since we're stopping our own > cpu, it should be guaranteed that the stopper has finished by the time we > exit schedule(). I remember loosing a state can be a problem. Lets say it is not "just" TASK_UNINTERRUPTIBLE -> TASK_RUNNING which sounds harmless but it is __TASK_TRACED and you lose it as part of unlocking siglock. > -Scott Sebastian