Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5170244rdb; Wed, 13 Dec 2023 00:24:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYC6c4mWfVuR+0dQmFczPVnxqq/VHVUIPxckavhnvunq7yDpAg33d8kBHAMjBS2/n24j7W X-Received: by 2002:a05:6358:ce1f:b0:170:17eb:14c0 with SMTP id gt31-20020a056358ce1f00b0017017eb14c0mr4769695rwb.48.1702455849708; Wed, 13 Dec 2023 00:24:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702455849; cv=none; d=google.com; s=arc-20160816; b=UY1gK29o84dSdKOaXCSzbqEzxhiQtSN8L283y8l5xbpLfV2FDf0F91UiWzwKTZNlmP n2lKM8F3Eq0vN9zinZ05X+Y6O1qtaNAaTH/xdQN3Q7kthjOohwXpk5UWtNNXjOH55Xl0 vW6HacUvmjg90umg0/cPOdcyUulcy0JOIteAkyJuVxHS0+UxA39FG38swLChfZQHzD13 aKoeoze40VYNBFo3TlgmcgAp4pqJYWAvBapr09XKhhtgw4XstfvOKZfVQ7znLPclGGEc yyRpjWqjPh7qdtzd2TBhAeDC2etH57DSDJyUa2tWUlNnwdUlxQ3CJO1Q/6TW21CufMNB Y3Ig== 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=qCVNOaLr4tkihNZ++QhY5TPWTKHDR7VGtdB5p3rXeI0=; fh=L5blFZhM7ka7cCoctgmd6M5+vyw6nsMZ1DpHic9fTjg=; b=wB9QX4Vcv7WWor0DKfjiWdREQCQm/x4kqCec917JOibAGLsUlWnmgt6GWLLCKr1aEC EIhv9nlBsq6TnZ1/46JuZCPepF6WugdgmGdLyw5ZIuta6skngJJCyI/a0MXNxOY2TNTy Z0rQrPY3SzLO2MEL8a/Ac/nNJFMEH2PE+pXUU7Rrvf0bYHzamU91AAqt50/kRedlipYt ggjdFM9dh220xSwwnpqPdioICydAnPSUdAv+3VCcBU2cXEPOFI5yaf8qmLJhbHuZ1i14 S8bX/9DEG6F/Wcdenc1NGkJmwF0irMLLF0B63qcqGWd2onyjr7wCfc06/tg3eEkGju0T XMSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BcgpAodw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id qc15-20020a17090b288f00b0028ae26639c0si847393pjb.60.2023.12.13.00.24.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 00:24:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BcgpAodw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 471428135BDD; Wed, 13 Dec 2023 00:24:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231226AbjLMIXw (ORCPT + 99 others); Wed, 13 Dec 2023 03:23:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbjLMIXv (ORCPT ); Wed, 13 Dec 2023 03:23:51 -0500 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD27DDC for ; Wed, 13 Dec 2023 00:23:57 -0800 (PST) Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-6d9f514f796so4008281a34.3 for ; Wed, 13 Dec 2023 00:23:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702455837; x=1703060637; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qCVNOaLr4tkihNZ++QhY5TPWTKHDR7VGtdB5p3rXeI0=; b=BcgpAodwa6Sw0xgYnPeu2UmtxKDvHxDat3EYUTX2IbW9Qg8+qNBZew8AAUZ8vL609j 645Sd1ookwkoPQMfiSZonEJNydsDA31zNNT7RRSNBDukvjPIGaV2yOfoO9KY4pKwx+a2 Ha8Na4C2TmGceV3b6XPycpHsvm6jd26QzWaqjntP2NNxmRorsYPsmGdJXyi6NXJh22le HWWWINJ/UrrN5omcfygLvshr4oqQafrXQkXo/kh0P4NCK08TFKYVebtGLI8Avik7dRp6 1e1QRUZTkRIPps7PRZ37WjY8Ugzk1ubX1AW4ulRYkVa1eCOpKOiDVOMy8AoQ2IMUnnA2 tdjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702455837; x=1703060637; 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=qCVNOaLr4tkihNZ++QhY5TPWTKHDR7VGtdB5p3rXeI0=; b=GNApfmaLEh0+E3ihI+g7wqZDE62qmdnq4kJCsGjOZHs42tHtQutW6q1P2LQAw99j60 XIYewmthnGQ+TZPY/DWPRbBPpbVucr+8XBbq6pGt5jvVmN0v52tx+Q2Xw6BXdlPrOd0r OrJrJM/PURCuRDVKAebiXQjdks7OV1lREMOnwj9nvfuFgM57qpUW9awPctOBDM/6F8qp aEuH8hlsJ858PzFTN43xnVnIonR26R5w3muuJBB6fmys29FwaqvM6o3QdnEcoUYLJqRJ CDHwBpMFD8VbYKr6jt0pl/8C82n6L9Da7Xrbk9YclNbpSeYlbkjaM5+XbPlKNLddve7c +uEw== X-Gm-Message-State: AOJu0YznJQo575AY3Qvrwm8nGU+oaLFAELjZL2HPnXgQikmRzHS7Q0Dc 6hEGRaMA1NVb99NMyT4nl3zbD4YzAGkdRO2HBWfKGQ== X-Received: by 2002:a9d:6d02:0:b0:6d9:e7d8:a4c7 with SMTP id o2-20020a9d6d02000000b006d9e7d8a4c7mr8247396otp.73.1702455837076; Wed, 13 Dec 2023 00:23:57 -0800 (PST) MIME-Version: 1.0 References: <202312101719+0800-wangjinchao@xfusion.com> In-Reply-To: From: Vincent Guittot Date: Wed, 13 Dec 2023 09:23:46 +0100 Message-ID: Subject: Re: [PATCH] sched/fair: merge same code in enqueue_task_fair To: Wang Jinchao Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org, stone.xulei@xfusion.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 13 Dec 2023 00:24:07 -0800 (PST) On Wed, 13 Dec 2023 at 08:04, Wang Jinchao wrote: > > On Mon, Dec 11, 2023 at 04:23:52PM +0100, Vincent Guittot wrote: > > On Sun, 10 Dec 2023 at 10:22, WangJinchao wrote: > > > > > > 1. The code below is duplicated in two for loops and need to be > > > consolidated > > > 2. Fix the bug where a se's on_rq is true but its parent is not > > > > Could you clarify which bug you want to fix ? > Taking into account the additional information provided by Tim, > this is not a bug. Therefore, this patch is merely a logical > simplification. If there is no bug why changing it ? The duplication is done in order to have the same pattern in : enqueue_task_fair dequeue_task_fair throttle_cfs_rq unthrottle_cfs_rq so there is no need to change it > > I will send out a v2 and update the description in it.