Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2540646rwb; Sat, 8 Oct 2022 09:31:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7gQ/iCKfgINV1woGOIfKQZjm6A9SwiJWcfg+hGj2TzsZWM5IL9VWvHZuRqsRaNWNc3/MU3 X-Received: by 2002:a50:fc85:0:b0:458:e7c6:1cfa with SMTP id f5-20020a50fc85000000b00458e7c61cfamr9670431edq.256.1665246676354; Sat, 08 Oct 2022 09:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665246676; cv=none; d=google.com; s=arc-20160816; b=jw1I1v+j7GmrMNNGdTMNzvFjkPCTgn//m0r5kF8VUm8cbutqkgKGNFg6ahSciBhxzn sSdLeM0wps7WacRph7EAEqHgAhXmRpXW5fmAVrXJFzaTuphTWNFa3c28e22C9lU4wmIF zPTPGBqKz5p46SHOZ/zIsxhmF/d0WkmbPUgFgI6/OF1Q3Mh8Yj0pFfxx6kr1QIUowBAR jfLYAl/9auSy+rTpeVdLeSXvbE5MJVSJWOH199eHVOXO0k7k0zgrOlVcJgXIwe9EsaEp 0UzI8ZM6m6H177XPz/vigy1NCcech2aGSkfdaSzAn5MgcxjGCVYfogHHQmNPoG/VrDGn AT7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:in-reply-to:cc:references:message-id:date :subject:mime-version:from:content-transfer-encoding:dkim-signature; bh=YGpdtOjpskyq7830WM79Ud5JbDY9Fq/HmElSPixR6dc=; b=AjKMAUZlou0HGKl7gjT0lhqg2V5NSKRQX7sxeolDmx/uO26/lOL7kn6bhEvKBaqMbd TIf3NqAmr9hPIV//A9V+be0GhXCKobM9ZafxaCDWNmvbBqfZzlikDiSrirGxzJ2jM1Jf JsdGokTflJ0n/3Zvq7xqAu/iIJmm2GJVoC6k4G6QNCBDk56PlpUEqKTfoM5e6j6FvYt/ ayoWhdpF6Ra1aoIkKgcO+cax2Oo85Iycsn05zqo8Eu64R4fpSSkJZanOc4xHu0bEA2rA dFEk8FZbqNKy7N3R0WSSh8t5765mlVTuj21JOkF8+iEuq3TeDvPmNHTuaW6UDDYXdZo5 OJag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=alNwhRF4; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i1-20020a0564020f0100b0045bc5ea5334si2098897eda.115.2022.10.08.09.30.50; Sat, 08 Oct 2022 09:31:16 -0700 (PDT) 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=@joelfernandes.org header.s=google header.b=alNwhRF4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229616AbiJHPFA (ORCPT + 99 others); Sat, 8 Oct 2022 11:05:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbiJHPE6 (ORCPT ); Sat, 8 Oct 2022 11:04:58 -0400 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B2DA22512 for ; Sat, 8 Oct 2022 08:04:55 -0700 (PDT) Received: by mail-qv1-xf29.google.com with SMTP id mx8so4794149qvb.8 for ; Sat, 08 Oct 2022 08:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=YGpdtOjpskyq7830WM79Ud5JbDY9Fq/HmElSPixR6dc=; b=alNwhRF4x6ZRyufvKiYDZTjnCylq0obGk+0Iqb78Q+0iqUgsbpnFYsoxAHjPXYkhGd CkF0lTQbMqa8f+qtGn6rSVo0Hf7/KYrVCnisT7cjO5g5jCsVFMLHM7BamfkU5CLsRP0Q 49Xdw3uNz/mWup0cy+MMz9ogipP92egyq87hw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YGpdtOjpskyq7830WM79Ud5JbDY9Fq/HmElSPixR6dc=; b=rvkKSylmTspjDGNVSbE7+hrXpKl22RCn/TYfri1VGBpbbMtbnqE1j01HAwQbTFNy+P KlvQ87LCN+ZcC7iJ798HpWhi9gAAgsXC1rLVpl2eazz9nQZI3dKO0fCSgO/T5RpY7dY1 u61np6RSvRKU6weZ1llKTcrAYsjvMThisg6NoX55q0qUy1CCHyhWf+26Rjq77xq/MOoL JLAXGGMH1vWJ5BFfoXPn41AX/aCtdYrwiqGfZp1cgrfaSQ05RWr4XnxJGBLvVMGu5LsE faqVLoxursPEkHfmYrW0sVmXGIizQgDc1dO4KX158i5qHOVz04ZDpLUmWs950rX4mcDQ TCDg== X-Gm-Message-State: ACrzQf1cir2JP3PY4dVHpcSH+UX6F/xrc/HCHYJKxal6ULIFzT5DOxX+ chZmfaEcZGgeT4N7D9j4j/fTtg== X-Received: by 2002:a05:6214:4116:b0:4b1:b795:f7c with SMTP id kc22-20020a056214411600b004b1b7950f7cmr8717446qvb.28.1665241494447; Sat, 08 Oct 2022 08:04:54 -0700 (PDT) Received: from smtpclient.apple ([2600:1003:b858:99c0:95bd:7b48:ffe8:6e89]) by smtp.gmail.com with ESMTPSA id s2-20020a05620a29c200b006b8e63dfffbsm4746951qkp.58.2022.10.08.08.04.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 08 Oct 2022 08:04:53 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Joel Fernandes Mime-Version: 1.0 (1.0) Subject: Re: Sum of weights idea for CFS PI Date: Sat, 8 Oct 2022 11:04:52 -0400 Message-Id: <0BFD3887-60A2-4C74-9D37-49B7B6E64299@joelfernandes.org> References: Cc: Qais Yousef , Peter Zijlstra , LKML , Steven Rostedt , juri.lelli@redhat.com, vincent.guittot@linaro.org, Dietmar Eggemann , Thomas Gleixner , bristot@redhat.com, clark.williams@gmail.com, bigeasy@linutronix.de, "Paul E. McKenney" In-Reply-To: To: Youssef Esmat X-Mailer: iPhone Mail (19G82) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Oct 6, 2022, at 3:40 PM, Youssef Esmat wrote:= >=20 [..] >>=20 >>> Anyway - just trying to explain how I see it and why C is unlikely to be= taking >>> too much time. I could be wrong. As Youssef said, I think there's no >>> fundamental problem here. >>=20 >> I know on Android where they use smaller HZ, the large tick causes >> lots of problems for large nice deltas. Example if a highly niced task >> was to be preempted for 1ms, and preempts instead at 3ms, then the >> less-niced task will not be so nice (even less nice than it promised >> to be) any more because of the 2ms boost that the higher niced task >> got. This can lead the the sched_latency thrown out of the window. Not >> adjusting the weights properly can potentially make that problem much >> worse IMO. >=20 > Once C releases the lock it should get adjusted and A will get > adjusted also regardless of tick. At the point we adjust the weights > we have a chance to check for preemption and cause a reschedule. Yes but the lock can be held for potentially long time (and even user space l= ock). I=E2=80=99m more comfortable with Peter=E2=80=99s PE patch which seems= a more generic solution, than sum of weights if we can get it working. I=E2= =80=99m studying Connor=E2=80=99s patch set now=E2=80=A6 > If C doesn't release the lock quickly (hopefully rare), it should > continue to run at the adjusted weight since it is still blocking A. We can=E2=80=99t depend on rare. Even one bad instance is a fail. So if lock= holder and releaser go crazy, we can=E2=80=99t destabilize the system. Afte= r all, this is CFS and fairness should not be broken, even if rarely. Thanks. >=20 >>=20 >> Thanks.