From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DEAB1CD2B; Wed, 17 Jul 2024 21:00:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721250053; cv=none; b=DVofZEss51TeUtHYNMAddzyB7YOIHt4jFpc3zgkykNlTBlvy9r0BkrTpro75fz0VjQSDAxqDh8AA1XfiXtvCQ8EIEyip3W3DBt3Gxac2T+UKh6v0z9OiJLT27ifgEnVqE1xG6xHwcPxz6MHtemS8rYHW4qG/Tfkp9lXw4ISkUH0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721250053; c=relaxed/simple; bh=sd17yyCSogEJ+geKjLkRzNk0EkzA6aa7NHHO4q+ztWE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jq6rQVt9Tb2VUaRIzuNko0xc7YeO++Szu/Wvz54U22Puo5/+Fm8CabHK5a9l0HUaz8DYR4rIau77BMUVa9sgM8x64QwX+0vH/qkgW2fUI9CUbMrHYbIyi1N9uBQhsF/DxpcfJx1Afth75H/z3sMZ1YF+n0oVczJzWU3HAMgRklw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2DF3C2BD10; Wed, 17 Jul 2024 21:00:49 +0000 (UTC) Date: Wed, 17 Jul 2024 17:00:47 -0400 From: Steven Rostedt To: Joel Fernandes Cc: Sean Christopherson , Mathieu Desnoyers , Vineeth Remanan Pillai , Ben Segall , Borislav Petkov , Daniel Bristot de Oliveira , Dave Hansen , Dietmar Eggemann , "H . Peter Anvin" , Ingo Molnar , Juri Lelli , Mel Gorman , Paolo Bonzini , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Vitaly Kuznetsov , Wanpeng Li , Suleiman Souhlal , Masami Hiramatsu , himadrics@inria.fr, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, graf@amazon.com, drjunior.org@gmail.com Subject: Re: [RFC PATCH v2 0/5] Paravirt Scheduling (Dynamic vcpu priority management) Message-ID: <20240717170047.5e1094f0@rorschach.local.home> In-Reply-To: References: <66912820.050a0220.15d64.10f5@mx.google.com> <19ecf8c8-d5ac-4cfb-a650-cf072ced81ce@efficios.com> <20240712122408.3f434cc5@rorschach.local.home> <20240712131232.6d77947b@rorschach.local.home> <20240717103647.735563af@rorschach.local.home> <20240717105233.07b4ec00@rorschach.local.home> <20240717112000.63136c12@rorschach.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 17 Jul 2024 16:57:43 -0400 Joel Fernandes wrote: > On Wed, Jul 17, 2024 at 11:20=E2=80=AFAM Steven Rostedt wrote: > > > > On Wed, 17 Jul 2024 10:52:33 -0400 > > Steven Rostedt wrote: > > =20 > > > We could possibly add a new sched class that has a dynamic priority. = =20 > > > > It wouldn't need to be a new sched class. This could work with just a > > task_struct flag. > > > > It would only need to be checked in pick_next_task() and > > try_to_wake_up(). It would require that the shared memory has to be > > allocated by the host kernel and always present (unlike rseq). But this > > coming from a virtio device driver, that shouldn't be a problem. =20 >=20 > Problem is its not only about preemption, if we set the vCPU boosted > to RT class, and another RT task is already running on the same CPU, That can only happen on wakeup (interrupt). As the point of lazy priority changing, it is only done when the vCPU is running. -- Steve > then the vCPU thread should get migrated to different CPU. We can't do > that I think if we just did it without doing a proper > sched_setscheduler() / sched_setattr() and let the scheduler handle > things. Vineeth's patches was doing that in VMEXIT..