Re: [PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-12-15 Thread Joel Fernandes
Hello Dhaval, On Tue, Dec 15, 2020 at 1:14 PM Dhaval Giani wrote: > > On 12/14/20 3:25 PM, Joel Fernandes wrote: > > >> No problem. That was there primarily for debugging. > > Ok. I squashed Josh's changes into this patch and several of my fixups. So > > there'll be 3 patches: > > 1. CGroup +

Re: [PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-12-15 Thread Dhaval Giani
On 12/14/20 3:25 PM, Joel Fernandes wrote: >> No problem. That was there primarily for debugging. > Ok. I squashed Josh's changes into this patch and several of my fixups. So > there'll be 3 patches: > 1. CGroup + prctl (single patch as it is hell to split it) Please don't do that. I am not

Re: [PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-12-15 Thread chris hyser
On 12/14/20 6:25 PM, Joel Fernandes wrote: On Mon, Dec 14, 2020 at 02:44:09PM -0500, chris hyser wrote: On 12/14/20 2:31 PM, Joel Fernandes wrote: diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index cffdfab..50c31f3 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@

Re: [PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-12-15 Thread chris hyser
On 12/14/20 6:25 PM, Joel Fernandes wrote: On Mon, Dec 14, 2020 at 02:44:09PM -0500, chris hyser wrote: On 12/14/20 2:31 PM, Joel Fernandes wrote: diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index cffdfab..50c31f3 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@

Re: [PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-12-14 Thread Joel Fernandes
On Mon, Dec 14, 2020 at 02:44:09PM -0500, chris hyser wrote: > On 12/14/20 2:31 PM, Joel Fernandes wrote: > > > diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c > > > index cffdfab..50c31f3 100644 > > > --- a/kernel/sched/debug.c > > > +++ b/kernel/sched/debug.c > > > @@ -1030,6 +1030,7 @@

Re: [PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-12-14 Thread chris hyser
On 12/14/20 2:31 PM, Joel Fernandes wrote: diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index cffdfab..50c31f3 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -1030,6 +1030,7 @@ void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns, #ifdef

Re: [PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-12-14 Thread Joel Fernandes
> diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c > index cffdfab..50c31f3 100644 > --- a/kernel/sched/debug.c > +++ b/kernel/sched/debug.c > @@ -1030,6 +1030,7 @@ void proc_sched_show_task(struct task_struct *p, struct > pid_namespace *ns, > > #ifdef CONFIG_SCHED_CORE >

Re: [PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-12-09 Thread Chris Hyser
On Sun, Dec 06, 2020 at 12:34:18PM -0500, Joel Fernandes wrote: > ... > Looks ok to me except the missing else { } clause you found. Also, maybe > dest/src can be renamed to from/to to make meaning of variables more clear? > > Also looking forward to the docs/test updates. > > thanks! > > -

Re: [PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-12-07 Thread chris hyser
On 12/6/20 12:34 PM, Joel Fernandes wrote: Looks ok to me except the missing else { } clause you found. Also, maybe dest/src can be renamed to from/to to make meaning of variables more clear? yes. Also looking forward to the docs/test updates. on it. Thanks. -chrish

Re: [PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-12-06 Thread Joel Fernandes
On Wed, Dec 02, 2020 at 04:47:17PM -0500, Chris Hyser wrote: > On Tue, Nov 17, 2020 at 06:19:53PM -0500, Joel Fernandes (Google) wrote: > > Add a per-thread core scheduling interface which allows a thread to share a > > core with another thread, or have a core exclusively for itself. > > > >

Re: [PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-12-02 Thread chris hyser
On 12/2/20 4:47 PM, Chris Hyser wrote: + get_task_struct(task); + + /* +* Check if this process has the right to modify the specified +* process. Use the regular "ptrace_may_access()" checks. +*/ + if (!ptrace_may_access(task,

Re: [PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-12-02 Thread Chris Hyser
On Tue, Nov 17, 2020 at 06:19:53PM -0500, Joel Fernandes (Google) wrote: > Add a per-thread core scheduling interface which allows a thread to share a > core with another thread, or have a core exclusively for itself. > > ChromeOS uses core-scheduling to securely enable hyperthreading. This cuts

Re: [PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-12-01 Thread Joel Fernandes
On Wed, Nov 25, 2020 at 02:08:08PM +0100, Peter Zijlstra wrote: > On Tue, Nov 17, 2020 at 06:19:53PM -0500, Joel Fernandes (Google) wrote: > > +/* Called from prctl interface: PR_SCHED_CORE_SHARE */ > > +int sched_core_share_pid(pid_t pid) > > +{ > > + struct task_struct *task; > > + int err;

Re: [PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-11-25 Thread Peter Zijlstra
On Tue, Nov 17, 2020 at 06:19:53PM -0500, Joel Fernandes (Google) wrote: > +/* Called from prctl interface: PR_SCHED_CORE_SHARE */ > +int sched_core_share_pid(pid_t pid) > +{ > + struct task_struct *task; > + int err; > + > + if (pid == 0) { /* Recent current task's cookie. */ > +

[PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-11-17 Thread Joel Fernandes (Google)
Add a per-thread core scheduling interface which allows a thread to share a core with another thread, or have a core exclusively for itself. ChromeOS uses core-scheduling to securely enable hyperthreading. This cuts down the keypress latency in Google docs from 150ms to 50ms while improving the