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 4C4A71109; Wed, 17 Jul 2024 14:36:52 +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=1721227012; cv=none; b=KuifIsfHrRLGLiGQnTjKcrT0UNvazq1JU4z2qqu24TY1XICDLu5SerNY/yrr4FhczcoNazXpqpD/RSTu3a+9BM5Q7ugw0DXjh/z/XqqEzH3jIapqN6oLN0pjh1/b5nSdFMWxTFz1Vmo5ECjscZlnjoXU+MgtPq+D9kyZBZhmomg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721227012; c=relaxed/simple; bh=CE9pKa3ma8lBfS7ILiZhNE4HGmrbG06pXvftfTT5KIk=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RyeT7zwDr6aWbYL6F/aSjSMhuDzdHso7suTeXXu6YEpsRPMAyd+huqzheIF0sIa2B7icx0paOMiTAAEetw6/cAmBYPNb/VYm4VhNScFOFzK7HeAdj1dcrDqCao67XEWGQMTkO2IOXVu6ElccLSrWvEM7feGCbWJR/9JRiIWAtrw= 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 D78D1C4AF0E; Wed, 17 Jul 2024 14:36:48 +0000 (UTC) Date: Wed, 17 Jul 2024 10:36:47 -0400 From: Steven Rostedt To: Sean Christopherson Cc: Joel Fernandes , 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: <20240717103647.735563af@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> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 17 Jul 2024 07:14:59 -0700 Sean Christopherson wrote: > > What you're saying is the scheduler should change the priority of the > > vCPU thread dynamically. That's really not the job of the scheduler. > > The user of the scheduler is what changes the priority of threads, not > > the scheduler itself. > > No. If we go the proposed route[*] of adding a data structure that lets userspace > and/or the guest express/adjust the task's priority, then the scheduler simply > checks that data structure when querying the priority of a task. The problem with that is the only use case for such a feature is for vCPUS. There's no use case for a single thread to up and down its priority. I work a lot in RT applications (well, not as much anymore, but my career was heavy into it). And I can't see any use case where a single thread would bounce its priority around. In fact, if I did see that, I would complain that it was a poorly designed system. Now for a guest kernel, that's very different. It has to handle things like priority inheritance and such, where bouncing a threads (or its own vCPU thread) priority most definitely makes sense. So you are requesting that we add a bad user space interface to allow lazy priority management from a thread so that we can use it in the proper use case of a vCPU? -- Steve