Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1433444ybk; Thu, 21 May 2020 06:51:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBi8LvUrmPpEIW1g0zUkRvaQ+PFxuB+PtqsJytfJihRZJHhNWoAEleJXI69nGFSdn4mIn1 X-Received: by 2002:a50:8750:: with SMTP id 16mr7527212edv.309.1590069066330; Thu, 21 May 2020 06:51:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590069066; cv=none; d=google.com; s=arc-20160816; b=YP7qJdz8rJMndatE8YMpi2i6suKaCVFl88AFdmMOXQ0JcKZ4iydn9Mdb46rwStTjZR O9uIXPx3x/IyDn2w7U6BEUDkrpjT5D6SJB0L4UxNgEjCcznCb/fa+APMDhidmlFxmKe4 I06IESM0jap/b0Hn9fBcFRwgSvhbiQ7UMrjp+XzOGXFj4Dbh6MuHCrqy3lJZLqIRvu7T dm1jyxysYlMCIhrMt3GLTdWgu61Jze/+Aa/4g+zGZ9X4MXeEy/cghrqDYQ3rq1YQKP45 elZWYb/8MwVy2Bljf54a0ks60T0trjSRX2r1QvtCPejaYVeSyODh5b57xSH1UcDd/D0f pXTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=J+C1gfkSjYLne9keDCP2UNyXwOjB62jHfW7cgQObU8s=; b=vwWvQsy3EibjpzfDcjBWyUwRVQPsQRS7efGJExFppZj1+UkqSpnXmV8txFoDpVzlIb IMPlqy+geHOjnIqC0vaRs6/QvzzAdsd7KzsgaUa9UtewqU+fHCIPF2btk2nsGRHKekDh NDRNLWrlLxxvZTAahVPeMsx7r8h83LPE7063M5GRAKIo98P1556BYFC4wEFeAk0yt6s1 LRAKzLp0YGXpzt/X7z09B1wJtacKGgbwMXYjYjmkjqlg4mt4K31WdTFil0x/EqAvySgv 5dxXQx7+sIBfeebhsBO/Z6krY9WgkTyoYEYQcybWud2syfrdyadwnXcvv/jT0u9Lon9Z Ajyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=b9jsebrf; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a21si3222115edj.559.2020.05.21.06.50.42; Thu, 21 May 2020 06:51:06 -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; dkim=pass header.i=@joelfernandes.org header.s=google header.b=b9jsebrf; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729508AbgEUNtP (ORCPT + 99 others); Thu, 21 May 2020 09:49:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729197AbgEUNtP (ORCPT ); Thu, 21 May 2020 09:49:15 -0400 Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9451C061A0E for ; Thu, 21 May 2020 06:49:14 -0700 (PDT) Received: by mail-qv1-xf44.google.com with SMTP id r3so3095135qve.1 for ; Thu, 21 May 2020 06:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=J+C1gfkSjYLne9keDCP2UNyXwOjB62jHfW7cgQObU8s=; b=b9jsebrfPmlbjKXFmG0YOx9tS7DFt1dWq3yu9lj9Zy2a794TG5RNkoOBzQQgfxnVJ+ R0+KYEXfPbFsFQeeOXsFN8KHLDqnxdnR/HCKIwNly9lM5VPwY5HvIBZvLQ0xN1fNwlYz jTIRWtXS5UjPp4yUzk/ZSEln0UaTVdNfrxpQs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=J+C1gfkSjYLne9keDCP2UNyXwOjB62jHfW7cgQObU8s=; b=F9P9zNm9B00d7Fns+3LoDQikR/fZZNf5Ojx2HqCTaN1orfJ/pDsgnVi8wIIsbQ9cr5 LpGVGEVsUzy45lIXG3gwBp1SdQsUjnCB9wT6sgAlqxIeeAbAwI9NPb2Zf1IiReeRCx+h 8NOUa4qITjI1Ih6UvYEKGNjidEtb6gzTdCtuYcHVWJZPF8YQMsA7nvLaGJo2/IxJyOQs t3sflL3WdTHTMsAVsVTv3r9y4nN1nmFf/Thal/9LvDofU5v2ftD7ONMgJYv0IW1fLNLQ ltL6Qwko4p1bIZn9k21cT7Nz7fYh0ACz8eTnsKTqYtOgcONAvPsV2xT9l7EEoFqnpvjt VGqw== X-Gm-Message-State: AOAM533oPtvAgrCyh7AZXwSG83D2ZSw/VNhM2YKwnN4C0NDVoHZvQop6 bY4wl8nnUnMt3rDm2bodsZTd8g== X-Received: by 2002:ad4:57cb:: with SMTP id y11mr9944990qvx.26.1590068954041; Thu, 21 May 2020 06:49:14 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id d140sm4287727qkc.22.2020.05.21.06.49.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 06:49:13 -0700 (PDT) Date: Thu, 21 May 2020 09:49:13 -0400 From: Joel Fernandes To: =?utf-8?B?YmVuYmppYW5nKOiSi+W9qik=?= Cc: Nishanth Aravamudan , Julien Desfossez , Peter Zijlstra , Tim Chen , "mingo@kernel.org" , "tglx@linutronix.de" , "pjt@google.com" , "torvalds@linux-foundation.org" , vpillai , "linux-kernel@vger.kernel.org" , "fweisbec@gmail.com" , "keescook@chromium.org" , "kerrnel@google.com" , Phil Auld , Aaron Lu , Aubrey Li , "aubrey.li@linux.intel.com" , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini Subject: Re: [PATCH RFC] sched: Add a per-thread core scheduling interface(Internet mail) Message-ID: <20200521134913.GB140701@google.com> References: <20200520222642.70679-1-joel@joelfernandes.org> <71B72E96-CD6E-43C3-B22B-ADE0EC78C550@tencent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <71B72E96-CD6E-43C3-B22B-ADE0EC78C550@tencent.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 21, 2020 at 04:09:50AM +0000, benbjiang(蒋彪) wrote: > > > > On May 21, 2020, at 6:26 AM, Joel Fernandes (Google) wrote: > > > > Add a per-thread core scheduling interface which allows a thread to tag > > itself and enable core scheduling. Based on discussion at OSPM with > > maintainers, we propose a prctl(2) interface accepting values of 0 or 1. > > 1 - enable core scheduling for the task. > > 0 - disable core scheduling for the task. > > > > Special cases: > > (1) > > The core-scheduling patchset contains a CGroup interface as well. In > > order for us to respect users of that interface, we avoid overriding the > > tag if a task was CGroup-tagged because the task becomes inconsistent > > with the CGroup tag. Instead return -EBUSY. > > > > (2) > > If a task is prctl-tagged, allow the CGroup interface to override > > the task's tag. > > > > ChromeOS will use core-scheduling to securely enable hyperthreading. > > This cuts down the keypress latency in Google docs from 150ms to 50ms > > while improving the camera streaming frame rate by ~3%. > Hi, > Are the performance improvements compared to the hyperthreading disabled scenario or not? > Could you help to explain how the keypress latency improvement comes with core-scheduling? Hi Jiang, The keypress end-to-end latency metric we have is calculated from when the keypress is registered in hardware to when a character is drawn on the scereen. This involves several parties including the GPU and browser processes which are all running in the same trust domain and benefit from parallelism through hyperthreading. thanks, - Joel