Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp581313rwe; Thu, 25 Aug 2022 05:56:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR6WVKYC3A0I0AZV2HRW0v+khtqx9YIsOYNDgC9PcE+UpNq7ORfKGUGAHRijY3cI9NwcRME+ X-Received: by 2002:a05:6402:28ca:b0:43b:5235:f325 with SMTP id ef10-20020a05640228ca00b0043b5235f325mr3076953edb.320.1661432185190; Thu, 25 Aug 2022 05:56:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661432185; cv=none; d=google.com; s=arc-20160816; b=jMK4dyg8Cv7Kr5sKLFRq0n87iqjm/895lV4tx5+p9MxS3Y2z1wRdOD4McvFR4cmsUU 6dqG10e/GIdGkiR+npGCVh2ZxhdLyY0aqd+gngvYIz/MBwQPz7s9GZ8iBIMUILfueYCa YEvk238N2Ofvt6U5BS+LsUBD8ugnQ29BxpENfRW27KfZXgBY6i0nZgRJFhzmMqBZULG7 wDqCdOKG4Cz5Ad1SajEQAHY/j78nxjPpv+Q7VPlp9YkGvnkg/g+u0Iu45SigtyJh9H+K G5DmMYkPFUYw+emRhw8QcaYw5H4UqwIhHvsiuCiajcvfJQad+L4SDCHnxjSMmc6kagyz EmJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=Ila7dO+0naAC7pik/BSrv/RJAUqzJmJgiT9+mebfzyM=; b=xroRSZxKPmcdLvPKNkhf17AntC1g+TURSEbXPNsswSq/e/5ee+EHy6sowNvpDzbNDA AMHdf6cZ16pCIcexcrvqINeHWg8TMHhQwpbWYefujdRQJaDAtIVIMDt1p2mlVq74RnPC LL3Xa6NopZV1km0I4krDa5YSz/gHi7d55sn37r/VdUS4cfLtdOf++ZSro/4LJK2zfQGU ubp9pILQ7/4G1IQHKOfXBkw8VuKijazLIiUSdh4p7Xpuc26Dh/PAYMPNCbjGcUlyGCfI vN8yzsmdFnMqVBFa42PAzMCYp6KmxWcLWx9j/L8kv2by1ljZ58Y17rvg8Nl/Yy553e3G ILwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IkDuU8ye; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fk8-20020a056402398800b0043d84f9413dsi5857546edb.604.2022.08.25.05.55.59; Thu, 25 Aug 2022 05:56:25 -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=@linaro.org header.s=google header.b=IkDuU8ye; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240607AbiHYM1e (ORCPT + 99 others); Thu, 25 Aug 2022 08:27:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239435AbiHYM1c (ORCPT ); Thu, 25 Aug 2022 08:27:32 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EDB8B2874 for ; Thu, 25 Aug 2022 05:27:31 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id z16so5603639wrh.10 for ; Thu, 25 Aug 2022 05:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:subject:cc:to:from:from:to:cc; bh=Ila7dO+0naAC7pik/BSrv/RJAUqzJmJgiT9+mebfzyM=; b=IkDuU8yej3eHmdrVmkxekXX5Qjxdvk5lHSqada5fCjbpyFI7Bgd9X8y4yCkEwgVKOM 5uBsm7z0xlk3w2NTdw/wr7osHjhXda0viWh6kFqKIYeTbbXymyZZA6grPi6qm+4dUuEo iKrJcXyvfFnw006F4qSUH5J8UvqTbe+OuE1s3wdaVja1YhpXBzngE+HTkr55ijwiI88P ck5ssqQw+QWqjjhaJ++BxJOePJlAucY5/rFJSefPuQKKdXnVl+fswvDsKGiX7CXcW+6k LOhFBMq2OfW7BBv8M3yfXOPaG7AmCmFldDWWsIuoi6w0CzvYZHiiVbMVGWZe0LsHntLX 4/Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=Ila7dO+0naAC7pik/BSrv/RJAUqzJmJgiT9+mebfzyM=; b=amo1idjBc015uQ/xe+hwoaM5baz8cBMOmXSkN0ivYhisJ9dblFctnnTdfBHleHx2mf IxAFV/gh6NKUcO7h9dB4STkKcQzYGpqAGOtCJD/6iDLIq/mvUQB76WLbsChJ4RDoWJWC FciPh8CN0oVJGkrh6kS94ShzquGkWJeutaKr4UtMKKTX6HouISkutw7lN5k/pJZuAhKb 9wUvBu/5teOVVuJn5Ll7qRKllczgwTOxqXBhqP+qauCxvIdo6wqgnrWMbfOpPzyO7ndk 936nwBXuuuzWZIxApWyAMcgAf4x8YCw/4SwErSzNt7wEoXpSmixt8rbIV+udxWtpBYT8 tPPg== X-Gm-Message-State: ACgBeo0f5hJBUmPThwu2gJNX+d5GHBypHexcvRbW5ISr//7kmreOSb/X 2V3tsJ+N7SMaqiomrRYm0DDuEg== X-Received: by 2002:a5d:4f81:0:b0:21e:2cd7:25df with SMTP id d1-20020a5d4f81000000b0021e2cd725dfmr2239459wru.439.1661430450002; Thu, 25 Aug 2022 05:27:30 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:f:6020:55dd:3519:10d3:b07b]) by smtp.gmail.com with ESMTPSA id c7-20020a05600c0ac700b003a5ee64cc98sm5417809wmr.33.2022.08.25.05.27.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 05:27:29 -0700 (PDT) From: Vincent Guittot To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, linux-kernel@vger.kernel.org Cc: zhangqiao22@huawei.com, Vincent Guittot Subject: [PATCH 0/4] sched/fair: fixes in presence of lot of sched_idle tasks Date: Thu, 25 Aug 2022 14:27:22 +0200 Message-Id: <20220825122726.20819-1-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.17.1 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,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 This patchset gathers somes cleanups but also improvements and fixes for scheduling UCs that involved a lot of sched_idle tasks. In such case, the sched_idle tasks impact significantly the behavior of other tasks whereas they should not. These patches don't impact other "normal" UCs. have foudn these changes while studying Zhang's problem [1] but AFAICT, these patches don't fix his problem. [1] https://lore.kernel.org/lkml/20220810015636.3865248-1-zhangsong34@huawei.com/ Vincent Guittot (4): sched/fair: make sure to try to detach at least one movable task sched/fair: cleanup loop_max and loop_break sched/fair: move call to list_last_entry() in detach_tasks sched/fair: limit sched slice duration kernel/sched/core.c | 6 +----- kernel/sched/fair.c | 29 +++++++++++++++++------------ kernel/sched/sched.h | 6 ++++++ 3 files changed, 24 insertions(+), 17 deletions(-) -- 2.17.1