Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp865405ybe; Fri, 6 Sep 2019 08:25:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwnh52Q/TnEppwKt2qDWO9MwrnBK0Ub3phscW9zQEaGK1mAELn57N89dPG5rvnYFfPOMJbZ X-Received: by 2002:a17:90b:318:: with SMTP id ay24mr10670121pjb.28.1567783547477; Fri, 06 Sep 2019 08:25:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567783547; cv=none; d=google.com; s=arc-20160816; b=0BW3zF9faUiwJl1F4UZCdUcXQMWnlcx5ujY0AiDaWUR/w24Pploo9SJWdZvdgjRsaZ /S9OkA9FB4PvjRYsurwEdgijIcXcB+7P1SRXe/J3dF8GcMZCisVm0F8RT94ToFeKy6Bq JOIPAVkuZuAVRhhrhLO97ujaKStMDdoxBXBeTdm9+FlcUpnTH2RBZ4VoHexa7kcCXAgS 2hjTe3Rq4B6f2TLfGtBxdQvmF8li9X127TLDUFBNVizI1xagHyy+t/cSzWeRiFj2f6K/ Lt0mxBxq06tGWhE6gPPIKdSa/VsjTUT6P/G5sx1PXMa+3Vq/oj1J/KtKib+TAfzg4BxP gyhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject; bh=bXATshZCj/zphh0+IqU4sNJ7P94LVXpjJZdfIJyQaNo=; b=pYpKJFbP5OICiBY8zcpBxCVPHAT8k/2vNBbuS/2ozs2GfGHhBMCyXjQO6Ur17zNE80 KbR7E+6HSuJ33IO13hGJNdIvoOva3rSHcpYnIDUGuEPo8A4tcpbcjwDJHN5Bvw+rnPGR 4udOTBcqJJVlJKzqwzT0ef4wPRPym6yilhrhftqKwT1u54tUygV7zjHsNDzISuzprjGY bT55wAOilcBWHqGNcPj/sTBeVsSHqptl4tZBolGzomOioNgp5aTeO5KIDLOyDrMujmWD Swz7Ec4eYTN220dZ7yEg8N7VO0Lh+HRTP3fCqzOdALOTok53HWDgtBC/3Dxn4ESoIsT0 qvnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q26si4719742pgt.233.2019.09.06.08.25.31; Fri, 06 Sep 2019 08:25:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404665AbfIFMWt (ORCPT + 99 others); Fri, 6 Sep 2019 08:22:49 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:20786 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728509AbfIFMWs (ORCPT ); Fri, 6 Sep 2019 08:22:48 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x86CMCxG050599 for ; Fri, 6 Sep 2019 08:22:48 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2uupbg28g8-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 06 Sep 2019 08:22:47 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 6 Sep 2019 13:22:45 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 6 Sep 2019 13:22:41 +0100 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x86CMeJf46072004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 6 Sep 2019 12:22:40 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BF9DEA405F; Fri, 6 Sep 2019 12:22:40 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ADFAAA405B; Fri, 6 Sep 2019 12:22:38 +0000 (GMT) Received: from localhost.localdomain (unknown [9.124.35.156]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 6 Sep 2019 12:22:38 +0000 (GMT) Subject: Re: [RFC PATCH 1/9] sched,cgroup: Add interface for latency-nice To: Patrick Bellasi Cc: Tim Chen , subhra mazumdar , linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@redhat.com, tglx@linutronix.de, steven.sistare@oracle.com, dhaval.giani@oracle.com, daniel.lezcano@linaro.org, vincent.guittot@linaro.org, viresh.kumar@linaro.org, mgorman@techsingularity.net References: <20190830174944.21741-1-subhra.mazumdar@oracle.com> <20190830174944.21741-2-subhra.mazumdar@oracle.com> <11aaa3a8-e6b9-cf1f-08bb-0f8e1b63942b@linux.intel.com> <87o8zz2gu3.fsf@arm.com> From: Parth Shah Date: Fri, 6 Sep 2019 17:52:37 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <87o8zz2gu3.fsf@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 19090612-4275-0000-0000-00000361F50D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19090612-4276-0000-0000-0000387440A1 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-09-06_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1909060130 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/5/19 3:41 PM, Patrick Bellasi wrote: > > On Thu, Sep 05, 2019 at 07:15:34 +0100, Parth Shah wrote... > >> On 9/4/19 11:02 PM, Tim Chen wrote: >>> On 8/30/19 10:49 AM, subhra mazumdar wrote: >>>> Add Cgroup interface for latency-nice. Each CPU Cgroup adds a new file >>>> "latency-nice" which is shared by all the threads in that Cgroup. >>> >>> >>> Subhra, >>> >>> Thanks for posting the patchset. Having a latency nice hint >>> is useful beyond idle load balancing. I can think of other >>> application scenarios, like scheduling batch machine learning AVX 512 >>> processes with latency sensitive processes. AVX512 limits the frequency >>> of the CPU and it is best to avoid latency sensitive task on the >>> same core with AVX512. So latency nice hint allows the scheduler >>> to have a criteria to determine the latency sensitivity of a task >>> and arrange latency sensitive tasks away from AVX512 tasks. >>> >> >> >> Hi Tim and Subhra, >> >> This patchset seems to be interesting for my TurboSched patches as well >> where I try to pack jitter tasks on fewer cores to get higher Turbo Frequencies. >> Well, the problem I face is that we sometime end up putting multiple jitter tasks on a core >> running some latency sensitive application which may see performance degradation. >> So my plan was to classify such tasks to be latency sensitive thereby hinting the load >> balancer to not put tasks on such cores. >> >> TurboSched: https://lkml.org/lkml/2019/7/25/296 >> >>> You configure the latency hint on a cgroup basis. >>> But I think not all tasks in a cgroup necessarily have the same >>> latency sensitivity. >>> >>> For example, I can see that cgroup can be applied on a per user basis, >>> and the user could run different tasks that have different latency sensitivity. >>> We may also need a way to configure latency sensitivity on a per task basis instead on >>> a per cgroup basis. >>> >> >> AFAIU, the problem defined above intersects with my patches as well where the interface >> is required to classify the jitter tasks. I have already tried few methods like >> syscall and cgroup to classify such tasks and maybe something like that can be adopted >> with these patchset as well. > > Agree, these two patchest are definitively overlapping in terms of > mechanisms and APIs to expose to userspace. You to guys seems to target > different goals but the general approach should be: > > - expose a single and abstract concept to user-space > latency-nice or latency-tolerant as PaulT proposed at OSPM > I agree. Both the patchset tries to classify a tasks for some purpose for better latency. TurboSched requires the classification of whether the task is jitter and should not be given enough resources/frequency. This is a boolean value. Whereas, latency-nice is a range. So does that mean that a max-latency-nice task is a jitter? I was thinking of not doing jitter packing on a core occupying min-latency-nice (i.e, latency sensitive) task (until there are other busier cores). Given this, we can expose a single per-task attribute to the user by a syscall, right? > - map this concept in kernel-space to different kind of bias, both at > wakeup time and load-balance time, and use both for RT and CFS tasks. > > That's my understanding at least ;) > > I guess we will have interesting discussions at the upcoming LPC to > figure out a solution fitting all needs. Definitely. > >> Thanks, >> Parth > > Best, > Patrick >