Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2824089ybz; Sun, 19 Apr 2020 10:28:58 -0700 (PDT) X-Google-Smtp-Source: APiQypKMfp2EMZ87uPnpRQP6uo+jbytKwAkooq5pPIZjr14XUNtWotZy8lxx3uQU1iICvdsZi2JA X-Received: by 2002:a17:906:1fd6:: with SMTP id e22mr12780878ejt.150.1587317338129; Sun, 19 Apr 2020 10:28:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587317338; cv=none; d=google.com; s=arc-20160816; b=VGWtQkmuvtpPF3riG1vppyM4//jAmkuMhoF9UbZe6f9tEEouRA8fZ9L0pkRHEgPuuX g4Ac6N341zXacIh48O9lf3xAGi3kCoyqT0woCKpzrg5SzmOPmNYDY4eRLGmr2CWgyplv 9b9vosLQbdwIvgMLm57IAPT/0BrGFaFawaUst2leZv69X6Lx/Y7WbZHmeq1DtTj7uFjw 4QT3vIGItWp7bRmE++yT4ky0ku1P4mvppG+vPEq1+RgcXaCANsB5dIewE1jHn+eqtt6w cIDuFQVGLz2UcjVDBELv+oqB6Eyin8azZ2KaDWzqF579eWaMNmTf53vSSDkP0TJ+AR8I 337Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=SepVQ36FQR88d7nOCnE/+DveO6zH6JDh5WpSTgI3Oq0=; b=Jx7TpAa2lI7XauXmOnTq7Ih/0BdwaXXjgYnjQp4cDc+K2n4ZP1y07tXoOQ5Ijbpn98 3PZwVQ//PYcK91nhG0/W03vNMMgDDlWME2QXP0Qk90+a2iFlaI268AYCc+PilYAr4Leb 9FOClZohZcf2E3ICJBIsHMAKElN8/E2SO0sZ3HcVAdfZsodJwILh3qcGDu5Wxcq+4Fim C3+54L65Vaojh5C4Olspy0Bi0mML1zvErynk763uZry3NZUhXxX2IKIiRWW9fa75/ZGY dEA6YdtPlo4/l1wG6DUZ5I08GutGmUpw0ozKBXlszNAG/l0c0l+WymC6cOqtS+aiBbfL 2s4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m28si13086354eda.183.2020.04.19.10.28.35; Sun, 19 Apr 2020 10:28:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726575AbgDSQbG (ORCPT + 99 others); Sun, 19 Apr 2020 12:31:06 -0400 Received: from mga06.intel.com ([134.134.136.31]:33454 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726211AbgDSQbG (ORCPT ); Sun, 19 Apr 2020 12:31:06 -0400 IronPort-SDR: URu+Zj8Zw//h0nulDAtxzqs3xOjybNQWZPjC3Y3ndpmUGhqAga0eA/TuPIFUXpGqHrLbuHd48Z 0iHZHbAt1Bpw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2020 09:31:05 -0700 IronPort-SDR: cDj466ESEicSNpCnZq11rUfjvRzpbm1kby5Rco7dNvhFBe4Jmb+r8Al/0O7/Bz++7AnnDCDTcv gT/z4frZkL4A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,403,1580803200"; d="scan'208";a="300079018" Received: from chenyu-office.sh.intel.com ([10.239.158.173]) by FMSMGA003.fm.intel.com with ESMTP; 19 Apr 2020 09:31:03 -0700 From: Chen Yu To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Chen Yu Subject: [PATCH 0/2] sched: Clean up newidle_balance() and pick_next_task() Date: Mon, 20 Apr 2020 00:31:30 +0800 Message-Id: X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As Peter suggested, here are two minor code clean up in the scheduler: 1. turn newidle_balance() into a static function. 2. code extraction in pick_next_task() for future re-use. Chen Yu (2): sched: Make newidle_balance() static again sched: Extract the code to put previous task in pick_next_task() kernel/sched/core.c | 39 +++++++++++++++++++++++---------------- kernel/sched/fair.c | 4 +++- kernel/sched/sched.h | 4 ---- 3 files changed, 26 insertions(+), 21 deletions(-) -- 2.20.1