Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp112599rwb; Mon, 28 Nov 2022 17:49:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf4/9FmDyTEWugYbMGQU+fe47RblolE73lpM3aBKTMzifLR6BYXxd9gpISxwbPL+hbHIIHCQ X-Received: by 2002:a17:902:da84:b0:185:3ecb:d464 with SMTP id j4-20020a170902da8400b001853ecbd464mr36234122plx.78.1669686547647; Mon, 28 Nov 2022 17:49:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669686547; cv=none; d=google.com; s=arc-20160816; b=zcgv/+a0xQZ4mB4ZrUpkKigtTgoWw3pE9wOy23/iM8Bt/nFMiadd+m84Jbp7NOchSd AneOvRexl7uZRR7gYcE8PQfJH+FpXE+WjDYJWEfAbQYWFD/Q2O+I77C//lhEuPg06d1U 023HJvAUvhF2okv698YC/3RuZ6PphKMND8PUWQILBnWwZJXJAsLoUqniPkwZs4Lxp7zk DVdX8Zr/3aOz6ouVW2jzKIO1ZJt52TMj5zMLo6CD0S5XWrOCjPkVLaZF/Pl56wKTQY1W VOI2TSDYCRVAStP8L6qsZ5Ls2bN5irDixrx0ghA3u8d7jRVRaMHnqaTP+DUxf+p+r/1d tTmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=yqhAJ45Mn60yAGeU39MmfTEM/a4wAbyDIX0NbEi7DBw=; b=wEktFmHgOrDXaVTEbBzIpilwbN9W5wL379aIlpM3/iHX/MM16DPNbrWDxWAZ1U4etX 2nnGJo56DsgXpoJefQAvr0reoB4pm+i5OCVCDZQTzcDMlYqOUk/KjAwSdCAT4kU9ByeX D0tORLLG3nMhk7hI5Pyy1/qR2irKqtBRyPz3NXODWW4+1n7fpJm6X6YeSxfT/Zr5kCH6 kupoTutZrkl+NSmmrYAM0GUWD2C6eJYumTj27ZAQqFKRNvgn8Hfb6nS5riTnt8sgMQIw bEb8TYxrL58v1ngpYMhVAGdFYcq2+xJB3P7jM26l6RzGkE4OHD8IX9XKZ7wuGJiMvRYe 2KgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=nzAFKZFY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x6-20020a17090a970600b00208e05957c9si348364pjo.20.2022.11.28.17.48.56; Mon, 28 Nov 2022 17:49:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=nzAFKZFY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235092AbiK2Bcc (ORCPT + 82 others); Mon, 28 Nov 2022 20:32:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233573AbiK2Bca (ORCPT ); Mon, 28 Nov 2022 20:32:30 -0500 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E692429B4 for ; Mon, 28 Nov 2022 17:32:29 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id d6so20228906lfs.10 for ; Mon, 28 Nov 2022 17:32:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yqhAJ45Mn60yAGeU39MmfTEM/a4wAbyDIX0NbEi7DBw=; b=nzAFKZFYpYrt0XQczu0dYlhG5WmM9qRVJHMmT8GlA+CDIgPP+7my461zOG4FBhOMGp ee6eq7Tda0KULuh3PlSLZ8pKu+xS2fIPW7CMJvb7ZoRqN5qKxuYHW3ItVEPgCiL47auF MQQ10xNZ0bpoEpZCUvzhmwZrumKD4UrjccOKZMIme6r2vvmhwlxLrqiT3yUiA3An1ekg nqInS12Sz6AAJwlUG/MOS4hJTN7GcQfvItkZ5DKbxtG7UFBmgiX++2/9GQVmi7VFE5E5 KYMbzlfzTKC7z5jF7Ikfvlcq8fuf5oH4+d5rO9alI55pPic7CA+rseDW+2XYNYufNAUV y/XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yqhAJ45Mn60yAGeU39MmfTEM/a4wAbyDIX0NbEi7DBw=; b=nSETL6RGfFZDQWmJffyXUJ2rvhoAaOIfv06xJK05tfFNpJ8ZQ7i1/2N2poHSJqoOLV aValL2H25EslicGBFh2HUG6Gf8oaZk1nuBatxaQgp1/vWkJAZNGYX2f5coRRLNu2My9u JQpv8hKrn18XmqY48cO0f0W2Xd7P5a5EVMfQA8eAxk+W6065t6RAJd3i8eIsH+ym+bnM twTqoYn/lpJjN6yEPcD1Mx3h7Vc0C+GJB4VIAYFy7HK/h1X+7AftZGTVb8TBjSOYwYQR qpQH+6WE716MfH8CY27/kfDyOTawaf2j+yMRLCOf1HY7DYF9fYBa1zzTwTwa5apwC0/s ZA0w== X-Gm-Message-State: ANoB5plhRyuNTSneMgrMb4g9RgnGwy8t3k2lsX3wY3QQZHoli6qJ/ozb sTIF5bik0iWUnigSTJyFbkWeIBWrhOE2z5YliKLy3A== X-Received: by 2002:ac2:5f41:0:b0:4b3:cc01:102b with SMTP id 1-20020ac25f41000000b004b3cc01102bmr19211562lfz.133.1669685547794; Mon, 28 Nov 2022 17:32:27 -0800 (PST) MIME-Version: 1.0 References: <20221117005418.3499691-1-joshdon@google.com> <094299a3-f039-04c1-d749-2bea0bc14246@linux.dev> In-Reply-To: From: Josh Don Date: Mon, 28 Nov 2022 17:32:15 -0800 Message-ID: Subject: Re: [PATCH v3] sched: async unthrottling for cfs bandwidth To: Peter Zijlstra Cc: Chengming Zhou , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org, Tejun Heo , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Christian Brauner , Zefan Li , Thomas Gleixner , Frederic Weisbecker , anna-maria@linutronix.de Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > @@ -1686,7 +1698,17 @@ static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base, > > lockdep_hrtimer_exit(expires_in_hardirq); > trace_hrtimer_expire_exit(timer); > - raw_spin_lock_irq(&cpu_base->lock); > + > + local_irq_disable(); > + > + if (restart >= HRTIMER_RESTART_MIGRATE) { > + int cpu = restart - HRTIMER_RESTART_MIGRATE; I know this is just a rough draft, but just noting that this wants a check against MIGRATE_MAX :) > + if (new_cpu_base != cpu_base) { > + timer->base = new_base; > + enqueue_hrtimer(timer, new_base, HRTIMER_MODE_ABS); > + raw_spin_unlock(&new_cpu_base->lock); unlock the old base->lock right?