From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH 3/3] sched: Implement interface for cgroup unified hierarchy Date: Mon, 26 Oct 2015 15:10:27 +0100 Message-ID: <20151026141027.GW2508@worktop.programming.kicks-ass.net> References: <20151023222110.GA4390@mtj.duckdns.org> <1445661367.3218.62.camel@gmail.com> <20151025021829.GA15471@mtj.duckdns.org> <20151025093331.GA4834@gmail.com> <20151025104145.GE27558@thunk.org> <562CB328.3090906@redhat.com> <20151025115842.GA13940@thunk.org> <562CD663.5010506@redhat.com> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <562CD663.5010506@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Florian Weimer Cc: Theodore Ts'o , Ingo Molnar , Linus Torvalds , Tejun Heo , Mike Galbraith , Paul Turner , Ingo Molnar , Johannes Weiner , Li Zefan , cgroups , LKML , kernel-team , Andrew Morton On Sun, Oct 25, 2015 at 02:17:23PM +0100, Florian Weimer wrote: > On 10/25/2015 12:58 PM, Theodore Ts'o wrote: > > > Well, I was thinking we could just teach them to use > > "syscall(SYS_gettid)". > > Right, and that's easier if TIDs are officially part of the GNU API. > > I think the worry is that some future system might have TIDs which do > not share the PID space, or are real descriptors (that they need > explicit open and close operations). For the scheduler the sharing of pid/tid space is not an issue. Semantically all [1] scheduler syscalls take a tid. There isn't a single syscall that iterates the thread group. Even sys_setpriority() interprets its @who argument as a tid when @which == PRIO_PROCESS (PRIO_PGRP looks to be the actual process). [1] as seen from: git grep SYSCALL kernel/sched/