From patchwork Mon Oct 31 12:51:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Qiao X-Patchwork-Id: 917 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2285253wru; Mon, 31 Oct 2022 05:33:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM61Af/QvGzouIKnAb21D8sVdpZjGT7f69MhP81Mhruxdf3YZVbPl3T3diDg7y2gKROMgZrz X-Received: by 2002:a17:90a:cb8b:b0:211:7744:d155 with SMTP id a11-20020a17090acb8b00b002117744d155mr31333204pju.187.1667219603123; Mon, 31 Oct 2022 05:33:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667219603; cv=none; d=google.com; s=arc-20160816; b=kTitDDenOREa56yeiddJB6XjnFexeQTx2h/p8Hy9QGoIYGp18YZK3pR8ynrw2+/RL3 RekFZUzsxptZWWGZSkE5Z+lcxtKIkGoldZjoLgnrN06kLsH8Tx32CaWi33NAjq7Af5qY 8T3AWj2NFveA8jzwO6AbudPKvZO044DkV2LR6ZXAYjOo0TVs+tM4Xp4w0wht3Wu88G6j UY3nnnUHmi/jENEmyzx759IelztGm5niXJEDUVDurgrZ+KmN4537k0+qGs0eiF15o0f+ SMMRFmTw6Im6MIPf3J9zUY2qRnxJXUFDM/GWicXEk2ZvxSitScZcGCn8PwQvyuDuXv8n Dxsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=T00Y68GEVhcs9KbQDI5d1Ez2hX+i4YeFYS1fzgbVuDA=; b=kdJEkJi1NVvVJ442QNtW6uJTE/guaYsf13E9qdw0mfaRe1aEZOcDgvS0Swk7jfNEUB P3C4AZUiXtozHlynQlx6IY/NJESuT3WxAeEZ9OSei76tGeHAmz8MHi6JY3qdoR3CEGNH iZYpJJwDcOfP0bGND3d82WB+V0kmbjcMcwvoe6dw4AtW9uDcg9GaG62zD+lu8zFVVvMs l68aWfclNbq5nEM2P6VbPWuvDEzrPtZit9LnhMl1A4bZ/P6bZOWWtsOaIFeC2/SkIGWa +JI79VzrLfxIaLO4dj7oPR0nBRGDeqyVktt9ANc31eOBgfLYE8ANSOg89YPPC1Uvh7Z2 CEkQ== ARC-Authentication-Results: i=1; mx.google.com; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b190-20020a6334c7000000b0046efd063864si8717427pga.109.2022.10.31.05.33.07; Mon, 31 Oct 2022 05:33:23 -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; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231341AbiJaMW4 (ORCPT + 99 others); Mon, 31 Oct 2022 08:22:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231245AbiJaMWt (ORCPT ); Mon, 31 Oct 2022 08:22:49 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23E33F58D for ; Mon, 31 Oct 2022 05:22:14 -0700 (PDT) Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4N1Bwn03MLz15MHd; Mon, 31 Oct 2022 20:17:13 +0800 (CST) Received: from dggpeml500018.china.huawei.com (7.185.36.186) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 31 Oct 2022 20:22:12 +0800 Received: from huawei.com (10.67.174.191) by dggpeml500018.china.huawei.com (7.185.36.186) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 31 Oct 2022 20:22:12 +0800 From: Zhang Qiao To: , , , CC: , , , , , , , , Subject: [PATCH next 0/2] sched: sched_fork() optimizations Date: Mon, 31 Oct 2022 20:51:11 +0800 Message-ID: <20221031125113.72980-1-zhangqiao22@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.67.174.191] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500018.china.huawei.com (7.185.36.186) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748206462672417208?= X-GMAIL-MSGID: =?utf-8?q?1748206462672417208?= sched_fork() use the current cpu init the new task's vruntime, but the new task maybe not run on this cpu. so this patchset will fix the problem. Zhang Qiao (2): sched: Init new task's vruntime after select cpu sched: Fix sched_child_runs_first kernel/sched/core.c | 7 ++++++- kernel/sched/fair.c | 11 ++++------- 2 files changed, 10 insertions(+), 8 deletions(-)