Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp6106598ioo; Wed, 1 Jun 2022 21:55:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyF3g/YnxFpuEDm74ggfVko+X3WSylXaiGB7fB4eGPD97qEvFXl1gcLH7XbQpI2DGjLHzLi X-Received: by 2002:a65:6bcc:0:b0:3f6:1815:f541 with SMTP id e12-20020a656bcc000000b003f61815f541mr2541924pgw.183.1654145717629; Wed, 01 Jun 2022 21:55:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654145717; cv=none; d=google.com; s=arc-20160816; b=ey4vIs+d/XZZ83O2+9F8xfb18yB+tYqSnwVLSN+S+3AdQzIEt8/ycoH2al/SnrNe/t UXoOgoUoF4h+EmIKVSUHEiGWD+GtjfSO9u4s4Fk6r/NK53velsxnAwkCNMD8ge5/frZK O2qRoQCUZNFr6XyiqnpWYAX2iMSw9qh91bnrUuW6aUQ85NtnO/AJcjSPB4ziXH+f6m3B YElldr+CJuQm4k/K91AwYegtPR8IUSQtwprKGD0ozOYIbCONNeDaya5doEvNSuTaD62f cNt+lQPk2PsmhCgoFLDL/SFHVgu+MBjbOugCOmfmonZL9rPToVrqBzTlJdCS432leuyZ tgUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=dS2pAcGt5EB2KqCtLnGsHBvORZ7kDSJrG3EnyQaVuyw=; b=y2GR5t7CWZd8t/2WVj7Cy4gpkxr6l7W4vy+X5w7NbdQ8oMaBd0K7cHSLo3HEITaC5Y p7zmVVMLDz9KWiQL7BRbJf1QT3s6qI5AfbNUOYvEuszByNlHNpp2NRRnrhAs9EV8Ikkh 5BUWcDnSD+VZD+7suBHAtuo6DYfVD3rFqz1NBZrkCEP7nMxCEHNJqZGN+gcThAvFO2Jm f4PgE4MSCHMOoEqsZ4J7FTwlU7Bjn4wXapWpQ75eV6No0yWKjYZPskEYB79V81/P0T+Y lNdqCyAR/X3/Ewmpc7ya+wy9znlNAJ2T0e7r66oNKRfyJj3u0hKz+YSKrw4PjNwT3IWG Tv3g== 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=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u11-20020a170902b28b00b00163fe7e3925si4684402plr.290.2022.06.01.21.55.02; Wed, 01 Jun 2022 21:55:17 -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=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229588AbiFBEHF (ORCPT + 99 others); Thu, 2 Jun 2022 00:07:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229558AbiFBEG7 (ORCPT ); Thu, 2 Jun 2022 00:06:59 -0400 Received: from out30-45.freemail.mail.aliyun.com (out30-45.freemail.mail.aliyun.com [115.124.30.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C84854692 for ; Wed, 1 Jun 2022 21:06:58 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04357;MF=dtcccc@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0VF8oYI7_1654142805; Received: from localhost.localdomain(mailfrom:dtcccc@linux.alibaba.com fp:SMTPD_---0VF8oYI7_1654142805) by smtp.aliyun-inc.com(127.0.0.1); Thu, 02 Jun 2022 12:06:54 +0800 From: Tianchen Ding To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider Cc: linux-kernel@vger.kernel.org Subject: [PATCH v3 0/2] sched: Queue task on wakelist in the same llc if the wakee cpu is idle Date: Thu, 2 Jun 2022 12:06:43 +0800 Message-Id: <20220602040645.275555-1-dtcccc@linux.alibaba.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,HK_RANDOM_ENVFROM,HK_RANDOM_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=no 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 Wakelist can help avoid cache bouncing and offload the overhead of waker cpu. So far, using wakelist within the same llc only happens on WF_ON_CPU, and this limitation could be removed to further improve wakeup performance. The result of Unixbench Pipe-based Context Switching can be improved up to ~10%. v3: Add a patch to fix the check of nr_running. After that, we can remove WF_ON_CPU to achieve the same purpose. Thank Valentin and Mel. v2: https://lore.kernel.org/all/20220527090544.527411-1-dtcccc@linux.alibaba.com/ Modify commit log to describe key point in detail. Add more benchmark results on more archs. v1: https://lore.kernel.org/all/20220513062427.2375743-1-dtcccc@linux.alibaba.com/ Tianchen Ding (2): sched: Fix the check of nr_running at queue wakelist sched: Remove the limitation of WF_ON_CPU on wakelist if wakee cpu is idle kernel/sched/core.c | 27 ++++++++++++++++----------- kernel/sched/sched.h | 1 - 2 files changed, 16 insertions(+), 12 deletions(-) -- 2.27.0