From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 792EF40313F for ; Wed, 27 May 2026 12:36:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779885388; cv=none; b=n8Q8vhU4nFT688IDqCOz17FBC0eRZSrLobHD2XKG2Ouw6lEjN4MUECu7NRugniTjgRuh673qr++/y916RQNd/8rys4uAgcBue52UBwOmrwQq4p0G+JLLlsZDGDelDvKy1ndYWcQJjQSAAyI23ibv7m93oATatLUIiLW56YQ3Yns= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779885388; c=relaxed/simple; bh=z8SnESy3gnQbn+QFOulHBCRjZrTL9spqdHBcQCXi3o8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GaGXTC861XIdgOS0pSHWG3ib0otm+XvsuL+s2ZaE8P4CRHX9PzVDTfX1QIV2VDaxex2AGiFP94tpjHxcTX44bxYsx5IjdErV0arKkg5py0FdihYTMHsAcCR4d08Yqa1knsPbINgXPVdDbtw/D00fIs1GD0E2QK4dZu0lcEGXAPk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=dVEE4w88; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=RXPSfUS9; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dVEE4w88"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="RXPSfUS9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779885385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=00VwKjTB9kl8nKM1Psf7Af/EO1i5jirjpXmjK/eUEG0=; b=dVEE4w88y+D9eesDIgIVzarL2Ajh6KAvhVXo8fuy79Pad2IgIFgpZKWtUzAcoLiVk7OcZ2 PMRmF+IFPxXIeQTYyc6ChIomai/FYM7bL/5kQDjGCxmoegW+QODYUgR5E0ugO0gPHZjUIw XIOBE7Bvs0tjGpCOLVLB4gTQJHBXrdk= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-281-MgCeUaFeN3mCTZvO1OGBtQ-1; Wed, 27 May 2026 08:36:24 -0400 X-MC-Unique: MgCeUaFeN3mCTZvO1OGBtQ-1 X-Mimecast-MFC-AGG-ID: MgCeUaFeN3mCTZvO1OGBtQ_1779885383 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-49048bcbeb8so60241825e9.2 for ; Wed, 27 May 2026 05:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1779885383; x=1780490183; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=00VwKjTB9kl8nKM1Psf7Af/EO1i5jirjpXmjK/eUEG0=; b=RXPSfUS90JDbIfQRcgKvH+p2EtJsGgOcOrmQQhkqE3h5H3ldjS5jcVegNHjwu9u5Ar bVPdHkAKl6WfGS4O0mOAIkz169xaiJ1iSb4bWditV4D1OJxTBbK29EdqWLlODrU2BJuj 5ejjPFvzGwhtmREBFE6o8TluHnOECWQrkvraC+Dz0Vj+gaUQ2XUToCgC9z8Az7akUqh6 ZWwrTXPqO8cET4LPDcYJhe23K1aYAvJ5jGarEavA/L3aqn9IU9ugiK+1Oe3ezrbJBQ37 hsbr2OgFTM1WgG+eT4szmB66JhpfJuXgjvCOQvPkMByqzboyGCqtRBhnoe/sY+qjwrpv By6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779885383; x=1780490183; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=00VwKjTB9kl8nKM1Psf7Af/EO1i5jirjpXmjK/eUEG0=; b=FOmsQKnpC0jr5zadUfhdoPrUMeWed5Q6RXNFT3JK8af7q5P/4JfrxMhM1QbQ8+tT0K 79dOX5FeeQkq6wqIWmqptZIhsKf9TPUtQJGW8jgWMYF9Uwj6zO3I6BV/LrCDV+NLQjTW pxKg3le8QCdl95nhb1HyugjQIavKlO2FfIYxGIYU+m+m4emFItokzqUq2Q0GJNOUu9SR Z16fr30JETSwRpgAdKOWTvM8yl3n7jT+SfrYwTdjbm1q1M4xMNApiXmOu3VwTPlX8rb4 Iz/FkvHE7id9djAHSkHQ5c/67wHukh8LUgXXoeWEtu2H6I1qAHNzoAG8aNOHmTeHbmjV w/cQ== X-Forwarded-Encrypted: i=1; AFNElJ+k0SipSthFieyDS2rRE3B8tRXLoOKoNpLhnxesj4Wu6CZnod4xeVTxhJpsbjNp2GryGLVjrqJ+jFIk44w=@vger.kernel.org X-Gm-Message-State: AOJu0YxrtT3hcAWVF1mKzntjFlfCrX37WxEFTEOhgiw4Yq2ZTN5ff/sp a0sI08gnqoM0eM1rMQuA59ySwrrA8Vy9xu3NnNhRN5TuJDAGXQdFRo/bY+nV+rxGw8xzxUmpKCa jnQSM7G6rXmOmceAGOj9F1fiviWGHlChKm7GvAeoKpmfSZF7ZhDRunkKVK3A4dEiBFw== X-Gm-Gg: Acq92OFQUHwaQjyMvf04ipOjCoE0G3ewPWF2T2DVgk1nkWPLnzMXnOc/cvIdDwISJCG LLVe33cX2rsmimWNAsqvaciKMEpMPEbk93LnRO7yL9xrTH9fzyjXN4+bZ+rUSDOe3jEAp/v65ym T/bvH9M9F+nL2YN4jm9kf6AvITG3xTNpo8BytybsWfKKmpi4HdSQQlWX5OrMzX4dOzgB+Pq4fBJ k0JpMo3Cmd+w++EYHDiTM2bai9rV53Ya+VIdeYkiSuHMb+G1rssSH0OVENOwDblEfaVYPwrxX1W gJvolwgwMWRwKk44L84CCFUh7bIUUS9TpQQ4nMCoTISKyPuroRn6m3YYQgAUmW7jUAzR/T6EuBb s99ZeYRBtYWbsDCYOrx+uKp3dACaO7iUOtVVFei5RvlS0V0K7vgIvDnhLaodolkk= X-Received: by 2002:a05:600c:83c8:b0:490:601f:d783 with SMTP id 5b1f17b1804b1-490601fd8f3mr246216735e9.4.1779885382959; Wed, 27 May 2026 05:36:22 -0700 (PDT) X-Received: by 2002:a05:600c:83c8:b0:490:601f:d783 with SMTP id 5b1f17b1804b1-490601fd8f3mr246216325e9.4.1779885382555; Wed, 27 May 2026 05:36:22 -0700 (PDT) Received: from jlelli-thinkpadt14gen4.remote.csb ([151.29.44.165]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4904527f7f7sm588107325e9.7.2026.05.27.05.36.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2026 05:36:21 -0700 (PDT) Date: Wed, 27 May 2026 14:36:18 +0200 From: Juri Lelli To: Andrea Righi Cc: Tejun Heo , David Vernet , Changwoo Min , Ingo Molnar , Peter Zijlstra , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , K Prateek Nayak , Christian Loehle , Phil Auld , Koba Ko , Joel Fernandes , Richard Cheng , Cheng-Yang Chou , sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCHSET v3 sched_ext/for-7.2] sched_ext: Auto-manage ext/fair dl_server bandwidth Message-ID: References: <20260526164420.638711-1-arighi@nvidia.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20260526164420.638711-1-arighi@nvidia.com> Hi Andrea, On 26/05/26 18:42, Andrea Righi wrote: > Currently, a fixed bandwidth is reserved at boot for both the fair and ext > deadline servers, and this reservation remains unchanged unless explicitly > modified via debugfs. As a result, both servers permanently contribute to global > bandwidth accounting, regardless of whether a BPF scheduler is active. > > While unused bandwidth can still be reclaimed at runtime by other classes, this > static reservation prevents RT from fully utilizing available headroom in > situations where one of the sched_ext or fair class is guaranteed to be inactive > (for example, when no BPF scheduler is loaded, or when sched_ext runs in full > mode and replaces fair). > > As discussed at the VIII OSPM summit in Cambridge [1], a better solution would > be to dynamically register and unregister deadline server bandwidth based on the > active sched_ext state. This allows the kernel to automatically enable bandwidth > accounting only for the scheduling class that is currently active, while > disabling it for inactive ones. > > This patch series implements this automatic register/unregister logic. Moreover, > the sched_ext total_bw kselftest is also modified to validate the correct > behavior across the different scheduling configurations and ensure that > bandwidth accounting follows the expected state transitions. > > [1] https://retis.santannapisa.it/ospm-summit/ > > Git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arighi/linux.git dl-server-bw-v3 > > Changes in v3: > - Don't bypass __dl_overflow() for detached servers in dl_server_apply_params() > to reject oversized configs up front (reported by Sashiko) > - A potential divide-by-zero in dl_server_apply_params() reported by Sashiko > has been fixed in a separate patch (not introduced by this patch set): > https://lore.kernel.org/all/20260526100502.575774-1-arighi@nvidia.com/ > - Link to v2: https://lore.kernel.org/all/20260526082954.550958-1-arighi@nvidia.com/ This looks now good to me. Acked-by: Juri Lelli Thanks! Juri