Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3657829pxf; Mon, 22 Mar 2021 11:39:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwb84jLO0xQIIc4+hbxnHI0yYv7Kz9QjrULqO7vGGNXLCdbCqQF3WfP1TX0edvdIM6dMVIj X-Received: by 2002:a05:6402:3493:: with SMTP id v19mr962186edc.355.1616438342457; Mon, 22 Mar 2021 11:39:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616438342; cv=none; d=google.com; s=arc-20160816; b=Qp1ybsoKFeL99UIa5B//y8Hi0EikF/2wHIqjRUJu3kPJBOfittojGp41lnrzRGRL5t veKVG0nSEq4qeZ15EIzgjPaUJzQnud2FRn8iA3GbUX3T9QXhK+/MJJ+KrDEUYFAwmaXQ z2sYWYlJn+sAy+CxfHmfLZ0tRU1toPB9iY2w+TOBsIhIJ4/YC6Ez/yLijQRzqutuikZG TQKhM7x9LMmNZpYjPFPOfILAfIcdQitwJqHn0qkgKySp4Uq94ezLi/GIneWSOLKJ2KHV kS3wBL7NcREiepf9PbKWSYGPWxLjQ9HhlJlZnPRTK+QpxM5IZXiyQxuRN89c7xbxNrWI gtaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BnYLpkvlSXiHqmO0XOcDbtxxMVP4XszzvtQMRIoe6/E=; b=YJc0jV4aVVLK6ti84d89p2ofIBY3fW7f5sZebz+9p/toDDTcM/wSpmLoLX59tG+Z/L 51hrSx9hqKcf/+4crnRLjeefem8yIioK5PHCd2IXQ0/H2FE3V1CgDo86mcPC54qEEGxz mVEnZ++z/PBnIq4wEu51X/LQL+FyXl4AmLdny4PGFMyCUF45YHfHAQpgLnc7vWi522CO CPULGF8ETGoV/0HO5x4RwciFP7qtB+yjjaZS/IMt7OC/0kghJEqckoLzMz5R1AA4/IVM hVtQP9rE0uRufIBIm7NWePgpa5dBWEuFulTBx3qZRmCsEII5zMhOOsKqk+SzKnb0A7EE J8Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=QFC71dYa; 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 u18si12268008ejk.68.2021.03.22.11.38.39; Mon, 22 Mar 2021 11:39:02 -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=@infradead.org header.s=desiato.20200630 header.b=QFC71dYa; 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 S230255AbhCVSf2 (ORCPT + 99 others); Mon, 22 Mar 2021 14:35:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229994AbhCVSfA (ORCPT ); Mon, 22 Mar 2021 14:35:00 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF60CC061574 for ; Mon, 22 Mar 2021 11:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=BnYLpkvlSXiHqmO0XOcDbtxxMVP4XszzvtQMRIoe6/E=; b=QFC71dYafwKTD7mmv8LoESqFYC jjtiKIF74NP1KTWzUVCwnxsgM55CWQpXmKIR3+8/svhvsprtawyExP5kSv7eEbS0iprWAgnPRF7Eh DZTeboeFE0rJAo+ooqv1YFyAeVWLOLla4+DgHS1tY1js9+OeGCG77UcQQHMafsSvU7sGg1nXOvyD9 WMBPiaS87Y/NrVvE6KYqJNebhQ5vpeeTCZcym+Fq1oH2q+sTFOeMGSFQBVd+TOMLU5zyvLpeHqMdm 8BkntYkG0ocxxC6IvGY1ebY0xVRBRK7fLvVAHb8Er5AxUznBtEl8/k36MeSnWgKNwgqOqa3PsrTlu vbgECHaQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lOPND-00CGew-I3; Mon, 22 Mar 2021 18:33:55 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id DAFD9301A32; Mon, 22 Mar 2021 19:33:52 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9E5912BD11CB6; Mon, 22 Mar 2021 19:33:52 +0100 (CET) Date: Mon, 22 Mar 2021 19:33:52 +0100 From: Peter Zijlstra To: Chris Hyser Cc: "Joel Fernandes (Google)" , Nishanth Aravamudan , Julien Desfossez , Tim Chen , Vineeth Pillai , Aaron Lu , Aubrey Li , tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org, torvalds@linux-foundation.org, fweisbec@gmail.com, keescook@chromium.org, Phil Auld , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini , vineeth@bitbyteword.org, Chen Yu , Christian Brauner , Agata Gruza , Antonio Gomez Iglesias , graf@amazon.com, konrad.wilk@oracle.com, dfaggioli@suse.com, rostedt@goodmis.org, benbjiang@tencent.com, Alexandre Chartre , James.Bottomley@hansenpartnership.com, OWeisse@umich.edu, Dhaval Giani , Josh Don , Hao Luo , Tom Lendacky Subject: Re: [PATCH 2/6] sched: tagging interface for core scheduling Message-ID: References: <20210319203253.3352417-1-joel@joelfernandes.org> <20210319203253.3352417-3-joel@joelfernandes.org> <20210320154632.GZ4746@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 22, 2021 at 01:57:48PM -0400, Chris Hyser wrote: > On 3/20/21 11:46 AM, Peter Zijlstra wrote: > > On Fri, Mar 19, 2021 at 04:32:49PM -0400, Joel Fernandes (Google) wrote: > > > From: Josh Don > > > > > > Adds per-task and per-cgroup interfaces for specifying which tasks can > > > co-execute on adjacent SMT hyperthreads via core scheduling. > > > > > > The per-task interface hooks are implemented here, but are not currently > > > used. The following patch adds a prctl interface which then takes > > > advantage of these. > > > > > > The cgroup interface can be used to toggle a unique cookie value for all > > > descendent tasks, preventing these tasks from sharing with any others. > > > See Documentation/admin-guide/hw-vuln/core-scheduling.rst for a full > > > rundown. > > > > > > One important property of this interface is that neither the per-task > > > nor the per-cgroup setting overrides the other. For example, if two > > > tasks are in different cgroups, and one or both of the cgroups is tagged > > > using the per-cgroup interface, then these tasks cannot share, even if > > > they use the per-task interface to attempt to share with one another. > > > > > > The above is implemented by making the overall core scheduling cookie a > > > compound structure, containing both a task-level cookie and a > > > group-level cookie. Two tasks will only be allowed to share if all > > > fields of their respective cookies match. > > > > > > Core scheduler has extra overhead. Enable it only for machines with > > > more than one SMT hardware thread. > > > > Oh man.. I'd soooo hoped to first see the simple task interface and then > > see the cgroup patch on top of that... I'll see if I can flip them > > myself (on monday). > > Peter, given we need to rebase this and we have some cleanup, we can go > ahead and flip the order if you have not yet done so yet. I didn't get around to it yet :/ So yes, please! Also can you then split the selftest thingies?