Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2001196rwi; Tue, 1 Nov 2022 02:33:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5+tUgsJV3c8XUfvYq/wII5rU+YFfMIVHMhdRJ9XtcLhBizYeK/KDyl6sUAaM0neJZhA7ua X-Received: by 2002:a17:90a:bf82:b0:214:6fd:90ec with SMTP id d2-20020a17090abf8200b0021406fd90ecmr3662666pjs.61.1667295234696; Tue, 01 Nov 2022 02:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667295234; cv=none; d=google.com; s=arc-20160816; b=g7MwCr0GrwWakeWCrF8kaj0jNZBYZvhO57jCHUOJwy2oeZ+YqNvZvRC9SOxuvVGpeu HN67ihfxcAA914Qe2w4VhjhIndDQQ8uIPJDiNJ8y+46DWhnF4hVguPJlEjjAdxMta2zE BBTqSzUuJwBdbhyXxmyJID+dnSyJMD3DO124q1Fso50mc2A07zmmU9DDOJcpLahHYRk3 WeazMAu5J6kpIeHcjfda5PtdMMlMJRV75uWLYkfYz+Wxxm0GPA19OKu4nPl1W8FNAQqS Y4HvF1xRebFfwYydlQY7ci5nk+I3G1cEE4dC9TjV1g33TNpjSfM0E7wftAsC2XdmJiAE 4few== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ipcpX1kbua7oatb0n4l1N5J+XozqPX/zfhKouT9X4LQ=; b=j1i6sJ3CVWeAQSOKKtTl4sfm5v3j5QaHfYTEAZgWleifWx3+en7flmR5Q6ioUuV1KI i/BLpGuHS12XFZDvRCncnmCOgNO+Pb86ZopQ49SegjBZcb/8k22Ed0tYIBMXG3a+2Ydi VJ/IPc3LWGjHFrnANs0d0pMk153OtyeRou5FfqqYV+2RD1bNqPO+3r3HnMLmul0Swf7q fdboTCjghqEkxbK6gT/UZB9/us1f8Hk//bny1lq/+pVizfCuCwxZvSjUOyG+R4+vU+bO GkpXW5u86iG2NMjBxydc48B4d7lF3wdgD9Mgeuwj1kAgUj8wYjhQTQrS6tsdBN7aC7Ez A4ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=CHoTVH90; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g24-20020a633758000000b0046ff70b1cf3si899538pgn.463.2022.11.01.02.33.40; Tue, 01 Nov 2022 02:33:54 -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=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=CHoTVH90; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230003AbiKAJOe (ORCPT + 98 others); Tue, 1 Nov 2022 05:14:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229993AbiKAJOd (ORCPT ); Tue, 1 Nov 2022 05:14:33 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48314646C for ; Tue, 1 Nov 2022 02:14:32 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id 192so12935511pfx.5 for ; Tue, 01 Nov 2022 02:14:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ipcpX1kbua7oatb0n4l1N5J+XozqPX/zfhKouT9X4LQ=; b=CHoTVH90o6acKk0jKiKLHuFHSToLSIbcNIi2PExg8h7B5+D3PnrfBGBFlwQ5bVxTAs gO5PU8y7uikwIbKcifQGP+B/MTyGjZAuCuEWU6WeAzTx1zMt6uP7NxDzR0YGnArS3Lat U5wCPvvSQmSTxnHc/nQiige6fNXaVUQv5cL5KtLo2VlGkV9iddrg3wBpHg7v7E1ZIvZS YXZwFr7Y8uQNncDpFTgYc1L1o81DA5M9PktwlrZnI+nmND7MHYE7m4DJa1fsasP5OCKz DeD/pS7Jd8unoEml+qpOuPKATk8nX5V4Kj/f1LiImCIKa+Xkz0amBtuExl5dywWNHbr0 cppw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ipcpX1kbua7oatb0n4l1N5J+XozqPX/zfhKouT9X4LQ=; b=Y7vU/Oib46ACQWbUXGCKGxRDG2Jh5fviyKWki6PU1Y0QMuB0aYNL3nq+bgcRz9b3fD wiIPcrK9tSHVpbssqfjhz4XbKFyTmvrBNi07RaqJz49kM2rgnW28bAlH88hzlf/aon2+ Etwg4ZgpqEB/bPY0HuwZWFEQi6RjqBKltuk47fjqkCs+RPUONHiH4ohxYmwz4ggQezeO wKz5cemp0YDqai2Kk0Kd/x0Ys+IvW/VMGS0f1OcX1icBEB8f0YTP+LU8p4KdvX2BuW4b dIfj7vukbzz7NoP4d2Hlc+8+kEtG3GOSJKY+uZF37ZpmEpjYjx+jE2Qgi/b2cvJzXWcT E+Kg== X-Gm-Message-State: ACrzQf3B5NJrI6t7UZmL5wLkbnol0Jmd+QY86yNUgxAVlUOaQGIhOPRZ tWsXPNdX5QdysTlRFfmSilOgcAAynX6rVA== X-Received: by 2002:a62:1e04:0:b0:56d:a2cf:e7fb with SMTP id e4-20020a621e04000000b0056da2cfe7fbmr5943315pfe.48.1667294071839; Tue, 01 Nov 2022 02:14:31 -0700 (PDT) Received: from [10.255.25.30] ([139.177.225.228]) by smtp.gmail.com with ESMTPSA id u1-20020a17090a3fc100b0020dc318a43esm5551259pjm.25.2022.11.01.02.14.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Nov 2022 02:14:31 -0700 (PDT) Message-ID: Date: Tue, 1 Nov 2022 17:14:26 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH] sched/fair: favor non-idle group in tick preemption To: Josh Don , Chuyi Zhou Cc: peterz@infradead.org, juri.lelli@redhat.com, mingo@redhat.com, vincent.guittot@linaro.org, linux-kernel@vger.kernel.org References: <20221027081630.34081-1-zhouchuyi@bytedance.com> <64d963b6-2d9c-3f93-d427-a1ff705fb65a@bytedance.com> <5af26ac9-3bdb-32d2-77a7-6cd8feca97aa@bytedance.com> Content-Language: en-US From: Abel Wu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,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 Hi Josh, On 11/1/22 6:44 AM, Josh Don wrote: > ...nit... > Some weirdness about this change though, is that if there is a > non-idle current entity, and the two next entities on the cfs_rq are > idle and non-idle respectively, we'll now take longer to preempt the > on-cpu non-idle entity, because the non-idle entity on the cfs_rq is > 'hidden' by the idle 'first' entity. Wakeup preemption is different > because we're always directly comparing the current entity with the > newly woken entity. Indeed. The hidden non-idle entity might run longer at the cost of delayed preemption. This behavior is not compliant to the SCHED_NORMAL semantics. But we also can't tell from here that the non-idle entity contains SCHED_NORMAL tasks or not. As long as the entities do not aware of the schedule policies, this ambiguity exists. Best, Abel