Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4587163pxu; Tue, 20 Oct 2020 23:28:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuLL/nAfYAGab4KZ1Tkm9nSsbW+j6rYGW85fwq9E1OK9EbmHJ8wJhXPmRo3vixEs7nbKVT X-Received: by 2002:aa7:dcd6:: with SMTP id w22mr1529786edu.378.1603261696165; Tue, 20 Oct 2020 23:28:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603261696; cv=none; d=google.com; s=arc-20160816; b=F6TW9cAxmX/V+WLs7nzCPAZ/hbY0NFxjp4dxSvSVtXNHdNQSrCE7C5asldVwX/2vs7 yCAMZ6KhKZJXsFRNY3ii5H4TbLfIC0j+AWoU1JVSZpABrNdX9CXT/EC4E+myqcsjdDYW oPZRA2Wa+iEWiP+Iv+s6nMDvydBRV6kfE1HkFDx5mCxFEtHrqudbPkcOIZW7++eX9HsB 2tyYmFszJqD75+wl7fWSrPJC2kzJlVYCgkv3yy5D3Va2E0Dv/MFEHHM2XVf5tnCaH7hy tgsh54DdlXkStcqKs/nJ6g6YKirlegcNicLhhBCQv4cPglCZgYsTIsVv+rzkXt8st9XS a9iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=LXYWkVPeje+Bu3Tdzt06RrE9K8vHtmOFiID7ZmDYILI=; b=utUrNA+Z15w4UiVOe4c3G68sui61ug8S6PePMZGLB3JtL1b0SaXCZjL362jjxAvFk/ LKr1L258LnLWc56Vcp0wabXH+q74zohHGPRYpP4UHnp6aQLX6Ob1Xw2+dFGg0/LLSxqY Q9y53O6Lf29pVJLO/EBQ4Kiw4P5LQ+8eEsBqw/OWXMws9wva8FEZY0nsnBfcDZKWp4zJ ztWZV4DfQeLVCQVCfHvVRagvQ3y1PWs+It4yZFeBEe+N0ZCB0mQF6XJjzAyDwwbH37HT I050sL3JC0PZMMhbSBOALYFTIejs/NSS2g0iKn4EiduYTjNCws2wv3PePQATlaYJO/Rl FVuQ== ARC-Authentication-Results: i=1; mx.google.com; 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 gf16si659787ejb.694.2020.10.20.23.27.54; Tue, 20 Oct 2020 23:28:16 -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; 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 S2436516AbgJTPie (ORCPT + 99 others); Tue, 20 Oct 2020 11:38:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:52366 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436483AbgJTPie (ORCPT ); Tue, 20 Oct 2020 11:38:34 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9CBC22222D; Tue, 20 Oct 2020 15:38:32 +0000 (UTC) Date: Tue, 20 Oct 2020 11:38:30 -0400 From: Steven Rostedt To: Thomas Gleixner Cc: LKML , Peter Zijlstra , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira Subject: Re: sched: Reenable interrupts in do sched_yield() Message-ID: <20201020113830.378b4a4c@gandalf.local.home> In-Reply-To: <87r1pt7y5c.fsf@nanos.tec.linutronix.de> References: <87r1pt7y5c.fsf@nanos.tec.linutronix.de> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Oct 2020 16:46:55 +0200 Thomas Gleixner wrote: > - /* > - * Since we are going to call schedule() anyway, there's > - * no need to preempt or enable interrupts: I think the above comment still makes sense, just needs to be tweeked: /* * Since we are going to call schedule() anyway, there's * no need to allow preemption after releasing the rq lock. > - */ Especially, since we are now enabling interrupts, which is likely to trigger a preemption. -- Steve > preempt_disable(); > - rq_unlock(rq, &rf); > + rq_unlock_irq(rq, &rf); > sched_preempt_enable_no_resched(); > > schedule();