Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1204138rwb; Wed, 16 Nov 2022 13:49:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf7p46Bqkq2qJc1hCKJPy2TRN0UaspLl7w9OBNewLugi5HuvN3ZtftyJEbZYPPtTyWHO54ot X-Received: by 2002:a62:65c3:0:b0:562:ce80:1417 with SMTP id z186-20020a6265c3000000b00562ce801417mr16044pfb.19.1668635382017; Wed, 16 Nov 2022 13:49:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668635382; cv=none; d=google.com; s=arc-20160816; b=thCJ8wW2ZeV7RnCnuwLoZtKTr4QHri5twYfze+sXQEmrcg0DCOa9qZEFit4Vv9m/KI bJTutnpVVpv3tGEAN9g+6Q9RgwTaqMvsnGsowbwsoMC+pYLqN2JVb9Akf5ymyuk2QH5b MR/s/pPcQFi/7qAwr4Z2onNQLUsLoVOI7fTGuncB2vpKa0bG2X0mPCqSOJGzcE+OaO5X 1o0FpAu65hNLZG3UBt9m6UCmhezuTNZ7B2it9RXsKb3htHuW1YuOGI74EiP3IKET7EEv 8CVvHezO7PHPSuCZlzFdSlJ0M+qWjr5vte26Fy1WusIkRcEI9EWcfsFoKN9MnxJZboAy y8tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=DwbDYoWggCopBBuTSq6VaQowU8is6PoXgXYL4Y8gLWg=; b=oZyYk3OGwPSCAD0Intq8FhJF0JtDwMrCelgKhoclcUsTXDRCsS9L69EtHzX0/etVZH 0Uxrtyojr5eCduXem0hyvKrOEr51TMSZeLGf50FD796xRkfUGte1/UXftgo28MehtjYu /GSrqX7Z0KX6qrlFcTqCwPUGpWrwr9bgrwTcLzfPVBbbp+kNujiq/ibs6eRu/LIusIJ7 IWLFRBKSHxsnjSGVXPH7k4LT9lqsXNuJips5QyRDCdS8ACSCuZHS85I5Z1lt2SM65lPQ u29OuzDYQGkpi+oESRcFi7dnN6HOD/KGXE48RpQO1pka8+NejkyJ+GkmK3jA7dkazIus Wu3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="c10/3GfA"; 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 h18-20020a656392000000b00434dd6f6e21si2896483pgv.125.2022.11.16.13.49.30; Wed, 16 Nov 2022 13:49:42 -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="c10/3GfA"; 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 S233413AbiKPVpt (ORCPT + 91 others); Wed, 16 Nov 2022 16:45:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232774AbiKPVpp (ORCPT ); Wed, 16 Nov 2022 16:45:45 -0500 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED6E813DDD for ; Wed, 16 Nov 2022 13:45:44 -0800 (PST) Received: by mail-lf1-x135.google.com with SMTP id g12so31791726lfh.3 for ; Wed, 16 Nov 2022 13:45:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=DwbDYoWggCopBBuTSq6VaQowU8is6PoXgXYL4Y8gLWg=; b=c10/3GfACFFJD16rXSQxqWquhSKoCgWsrJ80bqbsD9M5pdSRFavbGK+uWam1DWWNId RdmYrp0bOwkP17L0UJt8TbC58BkWsnqJmNX0RvLGZuDvgKYSqHA+NYnauZOv/GxkNHWM aAedjK/524gncwJnb/kKA+oGng5TmNipvvEsuzUUaU3tsa+gLFi9jrJA5Kj/qcsvYfZP CEWU1MbTZc5LN0eOr1BdHHCTg3BjVJ6T/iJgpsjg9J5LsaKZi6nnojcADKiDR7k15JJI PenojtM7GF4YQso0bmrDug87IPSxmewpvbhHEVF8nq4jvOWkthjKU50pl00UjqlOm+7n 3hTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding: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=DwbDYoWggCopBBuTSq6VaQowU8is6PoXgXYL4Y8gLWg=; b=TFycY9ixmsrUP8bR7HI3b6YudsPVcePrl0L+XUYfHegx3wn4hXopVUhEwYxSZPcK8K M9A3u6+IJt0V4hUqE5eqg+VwzLR+rwfiJ2ebh58rWWgJHrA60idDHzg/v0YOgSTfBYHp vO5iRzCAR7asXehLcEmd/P5lRPBiQpvpxaa5vr25RwxYvWCI/jpm5B2I3Cc/tfU9MSoW 73TJksI3+CbxScUaf/Li2mompAiyho8Xur+fVqRNN1mTdQr1Puc/11CB+DuWx3vV4E9o w9fTBcmFtUOQMiAwnxyVnyPpI7o57jD7VUKgIT40LgftPNw+psaQeWf2I1xp1h06B/Ui NNCg== X-Gm-Message-State: ANoB5pnWnkDunRQLYTDSLd/MbxkERwNIGt6CXbjGpH2M6vXsxVwA6Ci4 HQnsKWajWXb9GXZXviprW+qCtTj7BOxJSm/CJYhxcQ== X-Received: by 2002:a05:6512:1597:b0:4a2:676e:cf68 with SMTP id bp23-20020a056512159700b004a2676ecf68mr7693565lfb.546.1668635143174; Wed, 16 Nov 2022 13:45:43 -0800 (PST) MIME-Version: 1.0 References: <20221026224449.214839-1-joshdon@google.com> <20221102165922.GA31833@blackbody.suse.cz> <20221116095740.GA29859@blackbody.suse.cz> In-Reply-To: <20221116095740.GA29859@blackbody.suse.cz> From: Josh Don Date: Wed, 16 Nov 2022 13:45:31 -0800 Message-ID: Subject: Re: [PATCH v2] sched: async unthrottling for cfs bandwidth To: =?UTF-8?Q?Michal_Koutn=C3=BD?= Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Wed, Nov 16, 2022 at 1:57 AM Michal Koutn=C3=BD wrote= : > > What does it mean for SCHED_WARN_ON in __unthrottle_cfs_rq_async()? > > IIUC, if the concurrency of cfs_b->throttled_cfs_rq list is > expected (hence I'm not sure about the SCHED_WARN_ON), then it may > happen that __unthrottle_cfs_rq_async is called on cfs_rq that's already > on rq->cfsb_csd_list (there's still rq lock but it's only help inside > cfs_b->throttled_cfs_rq iteration). It catches a case where we call unthrottle_cfs_rq_async() on a given cfs_rq again before we have a chance to process the previous call. This should never happen, because currently we only call this from the distribution handler, and we skip entities already queued for unthrottle (this is the check for if (!list_empty(&cfs_rq->throttled_csd_list))). > > Thanks, > Michal