Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3724110ybz; Mon, 20 Apr 2020 08:18:37 -0700 (PDT) X-Google-Smtp-Source: APiQypKRfDVOs2Fv9l5f0xt1s3EDDR+XNRcoegWAawflgBmqV8Bmk4siRqQCcyEI03o9HKnkk4CT X-Received: by 2002:a17:906:bfc9:: with SMTP id us9mr2859078ejb.84.1587395917368; Mon, 20 Apr 2020 08:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587395917; cv=none; d=google.com; s=arc-20160816; b=tyHP7I1QA2wdoNWaEm5C3RTekypPB6YO6OM3wvaCKOPFMPpcMgg4N6RjA09rMHmH2D 7zSXqgSFHLgHJM7I2mLig9jYdLMT6nuk1rzWWXpPThBehflfK1sh5gchJpKhm79WEjhd GoMsh7uePM2pC4me59Im7LgDxWXoHaxzd24Ozx1izRHRJRyMkrHNwJC14FzRdu1oGwdx bFeRGh+LEdF5gd7R4ma6qvdcclLKCEQ9nuhDMtcyBJXBLdJ8xErkQ2XhOs1f/r+aZHY5 7e/uv2cfEAhl9MDT+bx4R0dYPWqXOBbi/lAYTs7Bdc69cz5PyDum40zO8h5rwOkykblg lGRQ== 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=tCp2mFGesE7VthUjvASSEIH/72nQwj217emC4xwg67U=; b=tNx9mRudiw5Np2qJqpDQxJ3VLNROqJNTF8fKqoBFwwKsqhXMThMqDs04vbU94AMP8O 2D82u80Z2XS3OH8w6LaUf8FIWlyF/E7PoNlano0tmh+2LmLb07myyUCkNd6KeJm400Sg 26/tQWWaiFCnt15cgap7GuECsP4rHWoMVqwJissowqzSC/ib5QB8XJwleARIOl1Jvr62 9bQFM/L+K3DpXOkId2uyK6IluKiTg0TRX8xKimXjw2tJ0Yq3kr1F7FHm1e3y9tQlu+sm JiTHLR/7q89n6Y5NGvln/yw72uC8wr4g/b2mtf/kiMc7ASCR8/pzFc0dpJOjISFluMaj meww== 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 x16si607544ejw.391.2020.04.20.08.18.13; Mon, 20 Apr 2020 08:18:37 -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 S1728923AbgDTPBK (ORCPT + 99 others); Mon, 20 Apr 2020 11:01:10 -0400 Received: from mga04.intel.com ([192.55.52.120]:48218 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726615AbgDTPBK (ORCPT ); Mon, 20 Apr 2020 11:01:10 -0400 IronPort-SDR: Bo+CwO6brjrTEdHI7DwAYyCO1jr+5ZHRrOBuM013Hd/XVGjOIzrJvvDPdK2EngtmTgH/z552wa +Xmv2hvRVFHA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2020 08:01:06 -0700 IronPort-SDR: n38Rg7HrYUkhUfLSZrRwY/W5+DT8LwFsFSdKOIDlzbVDXA92nc0Oycmz0PDhIlZZc3AxY9KYDk gZO1CTwGoY5g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,406,1580803200"; d="scan'208";a="279267745" Received: from chenyu-office.sh.intel.com ([10.239.158.173]) by fmsmga004.fm.intel.com with ESMTP; 20 Apr 2020 08:01:03 -0700 From: Chen Yu To: Peter Zijlstra , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman Cc: linux-kernel@vger.kernel.org, Chen Yu Subject: [PATCH 0/2][v2] sched: Clean up newidle_balance() and pick_next_task() Date: Mon, 20 Apr 2020 23:01:27 +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 task putting code from pick_next_task() kernel/sched/core.c | 39 +++++++++++++++++++++++---------------- kernel/sched/fair.c | 6 ++++-- kernel/sched/sched.h | 4 ---- 3 files changed, 27 insertions(+), 22 deletions(-) -- 2.17.1