From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751413AbdJDJqf (ORCPT ); Wed, 4 Oct 2017 05:46:35 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:37429 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751240AbdJDJqe (ORCPT ); Wed, 4 Oct 2017 05:46:34 -0400 Date: Wed, 4 Oct 2017 11:46:25 +0200 From: Peter Zijlstra To: "Uladzislau Rezki (Sony)" Cc: LKML , Ingo Molnar , Mike Galbraith , Oleksiy Avramchenko , Paul Turner , Oleg Nesterov , Steven Rostedt , Mike Galbraith , Kirill Tkhai , Tim Chen , Nicolas Pitre Subject: Re: [RFC PATCH v2] sched/fair: search a task from the tail of the queue Message-ID: <20171004094625.7ta62pocmcxui7gn@hirez.programming.kicks-ass.net> References: <20170913102430.8985-1-urezki@gmail.com> <20170913102430.8985-2-urezki@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170913102430.8985-2-urezki@gmail.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 13, 2017 at 12:24:30PM +0200, Uladzislau Rezki (Sony) wrote: > From: Uladzislau Rezki > > As a first step this patch makes cfs_tasks list as MRU one. > It means, that when a next task is picked to run on physical > CPU it is moved to the front of the list. > > Therefore, the cfs_tasks list is more or less sorted (except > woken tasks) starting from recently given CPU time tasks toward > tasks with max wait time in a run-queue, i.e. MRU list. > > Second, as part of the load balance operation, this approach > starts detach_tasks()/detach_one_task() from the tail of the > queue instead of the head, giving some advantages: > > - tends to pick a task with highest wait time; > - tasks located in the tail are less likely cache-hot, > therefore the can_migrate_task() decision is higher. > > hackbench illustrates slightly better performance. For example > doing 1000 samples and 40 groups on i5-3320M CPU, it shows below > figures: > > default: 0.657 avg > patched: 0.646 avg > > Signed-off-by: Uladzislau Rezki (Sony) Thanks!