From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 708F8C433EF for ; Thu, 30 Sep 2021 18:33:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 391CA61381 for ; Thu, 30 Sep 2021 18:33:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 391CA61381 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E3D346EC45; Thu, 30 Sep 2021 18:33:26 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by gabe.freedesktop.org (Postfix) with ESMTPS id EF5EC6E450; Thu, 30 Sep 2021 18:33:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=DIZyZIMPtrZviYPUhA7kumW9iGvFHoustq8r9Fe4NwA=; b=ANGhMQtO5SO4GSrl/cTqqzLmBl 0Nkd1VPrcFhNusU0EhzJ4symEhOwmuzxUBya+LLmbzKEYIMb9uBg/XiH/HPo9EfHZXzgmrDsjjO0q SaU2/4M1hJn/zey1tKkMQ5Uy5JcxJENFj5bxtF9DKdE0+d0n99nPSbDeyFITfHBgVMALtF6XAf7qt ZGsmM2bbxienMEeIxHfKLiaUBYOB0x5fZ23Lu4kn8f8ldNlmGC9yIvJbIq1RCbmiJA2KeKbrKJUSZ FvQKPT6mSuWQquEX+o80kolB7XoqRZkkkf25LNjwQPb6KHK49m2pLGwOx3ncifpSoiY+zIU4WGJrx HOM1P7xw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mW0rt-0070Cr-3g; Thu, 30 Sep 2021 18:33:17 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 643E6981431; Thu, 30 Sep 2021 20:33:16 +0200 (CEST) Date: Thu, 30 Sep 2021 20:33:16 +0200 From: Peter Zijlstra To: Tvrtko Ursulin Cc: Intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Tvrtko Ursulin , Ingo Molnar , Juri Lelli , Vincent Guittot Message-ID: <20210930183316.GC4323@worktop.programming.kicks-ass.net> References: <20210930171552.501553-1-tvrtko.ursulin@linux.intel.com> <20210930171552.501553-2-tvrtko.ursulin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210930171552.501553-2-tvrtko.ursulin@linux.intel.com> Subject: Re: [Intel-gfx] [RFC 1/6] sched: Add nice value change notifier X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Thu, Sep 30, 2021 at 06:15:47PM +0100, Tvrtko Ursulin wrote: > void set_user_nice(struct task_struct *p, long nice) > { > bool queued, running; > - int old_prio; > + int old_prio, ret; > struct rq_flags rf; > struct rq *rq; > > @@ -6913,6 +6945,9 @@ void set_user_nice(struct task_struct *p, long nice) > */ > p->sched_class->prio_changed(rq, p, old_prio); > > + ret = atomic_notifier_call_chain(&user_nice_notifier_list, nice, p); > + WARN_ON_ONCE(ret != NOTIFY_DONE); > + > out_unlock: > task_rq_unlock(rq, p, &rf); > } No, we're not going to call out to exported, and potentially unbounded, functions under scheduler locks.