From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753823AbdKXSrP convert rfc822-to-8bit (ORCPT ); Fri, 24 Nov 2017 13:47:15 -0500 Received: from mout.gmx.net ([212.227.15.19]:50992 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751591AbdKXSrO (ORCPT ); Fri, 24 Nov 2017 13:47:14 -0500 Message-ID: <1511549190.8029.233.camel@gmx.de> Subject: Re: [PATCH RFC 1/2] sched: Minimize the idle cpu selection race window. From: Mike Galbraith To: Uladzislau Rezki Cc: Atish Patra , Peter Zijlstra , Joel Fernandes , LKML , Brendan Jackman , Josef Bacik , Ingo Molnar Date: Fri, 24 Nov 2017 19:46:30 +0100 In-Reply-To: <20171124102636.zqqjqa3sru7ebh4k@pc636> 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> <20171124102636.zqqjqa3sru7ebh4k@pc636> Content-Type: text/plain; charset="ISO-8859-15" X-Mailer: Evolution 3.20.5 Mime-Version: 1.0 Content-Transfer-Encoding: 8BIT X-Provags-ID: V03:K0:FF+sqeImVdT3Kvv0ksD1DbVuQ+Kb2Mx/v754pAzppOrI6/X4xIJ sdurF/xeofGv9nxFkhoe+94lX7Z4YRqJGHpvLsFhax1fA8tNBIE1wCx2t+dDdJum9XkemCl OcXwW9gGQwWEoEUjKmrfl3gVOdryUPYb+Ynf496eC+HfOHlksUIgxv7NCf4I5fUFYzxjwg5 sul76WjxMvQUrvuV3QsEQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:tUWGODWP9y4=:7TaXa33lloIboWgsLHGhku gj5Cqql5VRB4dH1xcIG/NDNEnkfHDgqXDj123wa0GI14zliy6/APwiYk9be9v51cAiTrknP4l mQp4q4Qw14L8zj10uedRSUHXzlqHZ0NViPreSiuIjHVdSjK1fOCTGD2ZdebWjyM5AcoRzaJb9 zMi0Sv3ukHjIJXNmN7SCRhPhYtQlDC1a0yrYbjtfFe/x2H4ly0BcTyJzOQIod5RKk3eQt0881 kxhSSaIL/bNjTFi8JgxtK17NoGkfiGQmnSH2isQ42NhWjFYsauXKqOsN4M4Lo6ejhmt8FWH3S fbh91ctb2ZND2GPXIs5nKJd66kenRba9+DomPPehSFVRk2bLAO35id1lXu+yA2jYTd2OdPhkF PVYslsDpE1JJQUv8WM6dh60+m1MMD4Y6qOLYXZywXvg+0uZo/tKm7kTIuAeFQPEJ/ljxspTVr O/+yKDNawLvyiNmWMshFW5hnVXyulhQszz1fG+vhiRqQniWkwrjr5ODZQpgk6IwCSI+g0ixGP Y6y44Clw/UtQN5afUexwxmgC+nXfzyKvh+UJ97F+Pc3HJ2U/4NYDdlF7Lr7OoQdKYZouOdcx+ V7q8UDPRRXGiM8cSWPFB7HcPSXcCtm1HFTrAHU+CgP4MZXub+oDCoCL22T3CBfCf03RoUVDvH RaVt0EMbxLMQ1xHcoePe+gnmnsTvRkT3Lh6OGZxquWs1Cr10i+WpkDTmwD6A7FvnaBlr6mfzi KE0DGKP7zcGU286PVHdfBgDCM3ZyZayIueZCqJVRSzaavnpI8DFTraxFIRj1GwT+riYCRK3ae sI3mWfwFdce31l4mDWWvDuaBp07rnfLAmhHO7vnkL9mmplAYS8= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2017-11-24 at 11:26 +0100, Uladzislau Rezki wrote: > > I guess there is misunderstanding here. The main goal is not to cover > pinned case, for sure. I was thinking more about below points: > > - Extend a claim_wake_up logic for making an ILB/NO_HZ decision more > predictable (that is good for mobile workloads). Because as it is > right now it simply returns a first CPU in a "nohz" mask and if we > know that CPU has been claimed i think it is worth to go with another > ILB core, since waking up on a remote CPU + doing nohz_idle_balance > does not improve wake-up latency and is a miss from ilb point of view. Using unsynchronized access of a flag set by chaotic events all over the box? > If you have any proposal, i would be appreciated if you could > share your specific view. My view is you're barking up the wrong tree: you're making the idle data SIS is using more accurate, but I question the benefit.  That it makes an imperfect placement decision occasionally due to raciness is nearly meaningless compared to the cost of frequent bounce.  Better (but still not perfect, that requires atomics) state information doesn't meaningfully improve decision quality. > Considering a core as not-idle when somebody tends to wake up a task on > it is a good point. If you have any specific example when it is bad, > please share it. I'm not sure how that will work out. Probably like most everything wrt SIS, first comes "woohoo" then "aw crap", and off to the trash it goes. -Mike