From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753435AbdKWVMk (ORCPT ); Thu, 23 Nov 2017 16:12:40 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:39812 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752425AbdKWVMi (ORCPT ); Thu, 23 Nov 2017 16:12:38 -0500 Subject: Re: [PATCH RFC 1/2] sched: Minimize the idle cpu selection race window. To: Josef Bacik , Mike Galbraith Cc: Uladzislau Rezki , Peter Zijlstra , Joel Fernandes , LKML , Brendan Jackman , Josef Bacik , Ingo Molnar References: <1509427662-25114-1-git-send-email-atish.patra@oracle.com> <1509427662-25114-2-git-send-email-atish.patra@oracle.com> <20171031082009.rxxa57goto6q5xld@hirez.programming.kicks-ass.net> <49e98b00-80c7-b3a4-30fd-bccb382d002b@oracle.com> <20171123105247.wcl2fiypge2pvile@pc636> <1511442781.6505.26.camel@gmx.de> <20171123160006.tik2loyzzlavf5ub@destiny> From: Atish Patra Organization: Oracle Corporation Message-ID: <367a9ab5-58a9-95cd-ae51-ae02979c11d5@oracle.com> Date: Thu, 23 Nov 2017 15:11:49 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171123160006.tik2loyzzlavf5ub@destiny> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017/11/23 10:00 AM, Josef Bacik wrote: > On Thu, Nov 23, 2017 at 02:13:01PM +0100, Mike Galbraith wrote: >> On Thu, 2017-11-23 at 11:52 +0100, Uladzislau Rezki wrote: >>> Hello, Atish, Peter, all. >>> >>> I have a question about if a task's nr_cpus_allowed is 1. >>> In that scenario we do not call select_task_rq. Therefore >>> even thought a task "p" is placed on idle CPU that CPU >>> will not be marked as claimed for wake-up. >>> >>> What do you think about adding per_cpu(claim_wakeup, cpu) = 1; >>> to select_task_rq() instead and possibly get rid of them from >>> other places (increases a race window a bit)? >> My thoughts on all of this is that we need less SIS, not more.  Rather >> than trying so hard for the absolute lowest wakeup latency, which >> induces throughput/efficiency robbing bouncing, I think we'd be better >> of considering leaving an already llc affine task where it is if the >> average cycle time is sufficiently low that it will likely hit the CPU >> RSN.  Completely ignoring low utilization kernel threads would go a >> long way to getting rid of bouncing userspace (which tends to have a >> meaningful footprint), all over hell and creation. >> >> You could also periodically send mobile kthreads down the slow path to >> try to keep them the hell away from partially busy CPUs, as well as >> anything else that hasn't run for a while, to keep background cruft >> from continually injecting itself into the middle of a cross core >> cyber-sex. >> > And on this thanksgiving I'm thankful for Mike, and his entertaining early > morning emails. :) :). > Josef