From patchwork Thu Nov 3 12:07:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Qiao X-Patchwork-Id: 1089 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp478574wru; Thu, 3 Nov 2022 04:53:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5BceRIIy6YbidU8UT4ZNqZbH1KAbEoyH9smWG2DEJVIMrZjVo296oioKxJQi/xhFyq/CkS X-Received: by 2002:a17:902:ef52:b0:17c:f072:95bc with SMTP id e18-20020a170902ef5200b0017cf07295bcmr29252374plx.28.1667476401102; Thu, 03 Nov 2022 04:53:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667476401; cv=none; d=google.com; s=arc-20160816; b=e3rnqqgITGlRDqwOdCVhecA9mvov5xJ5Sigf2wQ3DL/ChjnscrBEgUHokNszFgtYPi vC96wf/2FqPuwF7EaRnkXxrvZJzls7u5vMPNRvbpqCR/hcBxuq/UuxqJFfSTb5bDhB6P TBkLPA5Ft6e+DK2atRbLqJkOdkX1+PMAyGUKW5CZ2iIzY8zizSAX1+lMBfyyhJZvfSIs emiL54wusVzG1OW1hh8Ji1ux5nM3UEQ9Ye6G2fctZ1kyUU3EriRRsVioJqUi+6/vOKvi F96VXu56V2mzLhmg/ClcSsvAVpOESRcF7iIG9x9BDJs5W813+aTt+1nJ0TJt6hafv0nx O1Nw== 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=A6A7dBSr5raZ0nT5wdJ/hGz0j8QF3YjFc+rc8uQWHMzqUJSkCun1+s3v6qavvDNhvq sIt3q4saJ+11J2m2W0652yFd3vDsmpag71jdxQOuuM6vACo/ZVQwYdLIjAU2emmK3JYi EOZS48khN5ALdUCQvasOYJr9vzsrksXcD/G0xYlFzGxA3J+UsBYVDHjnrWjdggQUs+vF WTD+3oiXV8Zy4d4BYNQssReeNHUT9haHo0wYUvtoTYK2CNrmtRIFBMiEfVwl9I18+0oA bDYAyiNDNUZqs4kuHnmn473fhn3XykOe+cgusoUcBdxv6HDi43pEwUlmzqHkeXbrHa8N xj0A== 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 b4-20020a170903228400b0016f1eb1317esi570400plh.471.2022.11.03.04.53.07; Thu, 03 Nov 2022 04:53:21 -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 S230415AbiKCLij (ORCPT + 99 others); Thu, 3 Nov 2022 07:38:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231255AbiKCLiY (ORCPT ); Thu, 3 Nov 2022 07:38:24 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95D4E12745 for ; Thu, 3 Nov 2022 04:38:23 -0700 (PDT) Received: from dggpeml500025.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4N31rR3fD1zpWCM; Thu, 3 Nov 2022 19:34:47 +0800 (CST) Received: from dggpeml500018.china.huawei.com (7.185.36.186) by dggpeml500025.china.huawei.com (7.185.36.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 3 Nov 2022 19:38:21 +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; Thu, 3 Nov 2022 19:38:21 +0800 From: Zhang Qiao To: , , , , CC: , , , , , , , , Zhang Qiao Subject: [PATCH v2 0/2] sched: sched_fork() optimizations Date: Thu, 3 Nov 2022 20:07:18 +0800 Message-ID: <20221103120720.39873-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: dggems701-chm.china.huawei.com (10.3.19.178) 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?1748475734715500225?= X-GMAIL-MSGID: =?utf-8?q?1748475734715500225?= 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(-)