Re: [RFC/RFT PATCH v3] sched: automated per tty task groups

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Thursday, November 11, 2010 - 11:34 am

On Thu, Nov 11, 2010 at 7:26 AM, Mike Galbraith <efault@gmx.de> wrote:

Ok, the patch looks fine, but I do have a few comments:

 - the reason I suggested the signal struct was really that I thought
it would avoid extra (unnecessary) cost in thread creation/teardown.

   Maybe I should have made that clear, but this seems to
unnecessarily do the whole atomic_inc/dec for each thread. That seems
a bit sad.

   That said, if not having to dereference ->signal simplifies the
scheduler interaction, I guess the extra atomic ref at thread
creation/deletion is fine. So I don't think this is wrong, it's just
something I wanted to bring up.

 - You misspelled "detach". That just drives me wild. Please fix.

 - What I _do_ think is wrong is how I think you're trying to be "too
precise". I think that's fundamentally wrong, because I think we
should make it very clear that it's a heuristic. So I dislike seeing
these functions: sched_autogroup_handler() -  we shouldn't care about
old state, sched_autogroup_detach() - even with the fixed spelling I
don't really see why a tty hangup should cause the process to go back
to the default group, for example.

IOW, I think you tried a bit _too_ hard to make it a 1:1 relationship
with the tty. I don't think it needs to be. Just because a process
loses its tty because of a hangup, I don't think that that should have
any real implications for the auto-group scheduling. Or maybe it
should, but that decision should be based on "does it help scheduling
behavior" rather than on "it always matches the tty".  See what I'm
saying?

That said, I do love how the patch looks. I think this is absolutely
the right thing to do. My issues are small details. I'd Ack it even in
this form (well, as long as spelling is fixed, that really does rub me
the wrong way), and the other things are more details that are about
how I'm thinking about it rather than "you need to do it this way".

                             Linus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC/RFT PATCH] sched: automated per tty task groups, Mike Galbraith, (Tue Oct 19, 2:16 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Peter Zijlstra, (Tue Oct 19, 2:26 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Peter Zijlstra, (Tue Oct 19, 2:29 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Mike Galbraith, (Tue Oct 19, 2:39 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Mike Galbraith, (Tue Oct 19, 2:42 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Peter Zijlstra, (Tue Oct 19, 2:43 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Mike Galbraith, (Tue Oct 19, 2:46 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Mike Galbraith, (Tue Oct 19, 4:29 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Mike Galbraith, (Tue Oct 19, 6:12 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Linus Torvalds, (Tue Oct 19, 8:28 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Mike Galbraith, (Tue Oct 19, 11:13 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Mike Galbraith, (Tue Oct 19, 11:53 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Markus Trippelsdorf, (Wed Oct 20, 6:55 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Mike Galbraith, (Wed Oct 20, 7:41 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Mike Galbraith, (Thu Oct 21, 12:55 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Mike Galbraith, (Thu Oct 21, 1:11 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Mike Galbraith, (Thu Oct 21, 1:39 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Markus Trippelsdorf, (Thu Oct 21, 1:48 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Mike Galbraith, (Thu Oct 21, 1:52 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Peter Zijlstra, (Thu Oct 21, 3:28 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Mathieu Desnoyers, (Thu Oct 21, 3:51 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Peter Zijlstra, (Thu Oct 21, 4:25 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Mike Galbraith, (Thu Oct 21, 4:27 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Mathieu Desnoyers, (Thu Oct 21, 9:22 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Oleg Nesterov, (Thu Oct 21, 9:29 am)
Re: [RFC/RFT PATCH] sched: automated per tty task groups, Mike Galbraith, (Thu Oct 21, 12:11 pm)
[RFC/RFT PATCH v3] sched: automated per tty task groups, Mike Galbraith, (Tue Oct 26, 12:07 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Mike Galbraith, (Tue Oct 26, 12:29 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Linus Torvalds, (Thu Nov 11, 11:34 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Mike Galbraith, (Thu Nov 11, 12:08 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Markus Trippelsdorf, (Thu Nov 11, 12:15 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Mike Galbraith, (Thu Nov 11, 12:35 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Linus Torvalds, (Thu Nov 11, 12:37 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Markus Trippelsdorf, (Thu Nov 11, 12:38 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Mike Galbraith, (Thu Nov 11, 12:58 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Mike Galbraith, (Sun Nov 14, 10:19 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Markus Trippelsdorf, (Sun Nov 14, 10:49 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Mike Galbraith, (Sun Nov 14, 11:10 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Linus Torvalds, (Sun Nov 14, 12:28 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Markus Trippelsdorf, (Sun Nov 14, 1:27 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Valdis.Kletnieks, (Mon Nov 15, 3:41 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Tue Nov 16, 10:03 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Linus Torvalds, (Tue Nov 16, 10:11 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Mike Galbraith, (Tue Nov 16, 10:42 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Peter Zijlstra, (Tue Nov 16, 11:08 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Tue Nov 16, 11:16 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Peter Zijlstra, (Tue Nov 16, 11:21 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Linus Torvalds, (Tue Nov 16, 11:49 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Peter Zijlstra, (Tue Nov 16, 11:59 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Peter Zijlstra, (Tue Nov 16, 12:13 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Peter Zijlstra, (Tue Nov 16, 12:25 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Linus Torvalds, (Tue Nov 16, 12:35 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Markus Trippelsdorf, (Tue Nov 16, 12:42 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Peter Zijlstra, (Tue Nov 16, 12:43 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Linus Torvalds, (Tue Nov 16, 12:45 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Linus Torvalds, (Tue Nov 16, 12:49 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Mike Galbraith, (Tue Nov 16, 12:57 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Tue Nov 16, 1:03 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Tue Nov 16, 1:05 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Tue Nov 16, 1:28 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Tue Nov 16, 1:31 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Tue Nov 16, 1:33 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Tue Nov 16, 1:36 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Tue Nov 16, 1:50 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Tue Nov 16, 2:08 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Tue Nov 16, 2:14 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Tue Nov 16, 2:17 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Tue Nov 16, 2:19 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Tue Nov 16, 5:21 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Wed Nov 17, 8:01 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Wed Nov 17, 3:34 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Wed Nov 17, 3:45 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Wed Nov 17, 4:49 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Hans-Peter Jansen, (Thu Nov 18, 3:33 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Samuel Thibault, (Thu Nov 18, 4:12 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Samuel Thibault, (Thu Nov 18, 4:43 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Samuel Thibault, (Thu Nov 18, 5:02 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Samuel Thibault, (Thu Nov 18, 5:07 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Samuel Thibault, (Thu Nov 18, 5:42 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Samuel Thibault, (Thu Nov 18, 5:59 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Samuel Thibault, (Thu Nov 18, 6:23 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Mathieu Desnoyers, (Thu Nov 18, 8:15 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Samuel Thibault, (Fri Nov 19, 2:02 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Mathieu Desnoyers, (Fri Nov 19, 5:55 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Mathieu Desnoyers, (Fri Nov 19, 6:20 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Samuel Thibault, (Fri Nov 19, 7:24 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Samuel Thibault, (Fri Nov 19, 7:55 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Fri Nov 19, 9:34 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Linus Torvalds, (Fri Nov 19, 10:51 am)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Mike Galbraith, (Fri Nov 19, 12:31 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Linus Torvalds, (Fri Nov 19, 12:48 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Fri Nov 19, 6:13 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Fri Nov 19, 6:33 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Sat Nov 20, 8:41 am)
[PATCH v4] sched: automated per session task groups, Mike Galbraith, (Sat Nov 20, 12:35 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Mike Galbraith, (Sat Nov 20, 12:47 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Mike Galbraith, (Sat Nov 20, 12:51 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Samuel Thibault, (Sat Nov 20, 1:25 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Konstantin Svist, (Sat Nov 20, 3:02 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Samuel Thibault, (Sat Nov 20, 3:15 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Thomas Fjellstrom, (Sat Nov 20, 3:18 pm)
Re: [RFC/RFT PATCH v3] sched: automated per tty task groups, Lennart Poettering, (Mon Nov 22, 12:21 pm)
[tip:sched/core] sched: Add 'autogroup' scheduling feature ..., tip-bot for Mike Gal ..., (Tue Nov 30, 8:39 am)
Re: [PATCH v4] sched: automated per session task groups, Colin Walters, (Sat Dec 4, 10:39 am)
Re: [PATCH v4] sched: automated per session task groups, Linus Torvalds, (Sat Dec 4, 11:33 am)
Re: [PATCH v4] sched: automated per session task groups, Colin Walters, (Sat Dec 4, 1:01 pm)
Re: [PATCH v4] sched: automated per session task groups, Linus Torvalds, (Sat Dec 4, 3:39 pm)
Re: [PATCH v4] sched: automated per session task groups, Colin Walters, (Sat Dec 4, 4:43 pm)
Re: [PATCH v4] sched: automated per session task groups, Linus Torvalds, (Sat Dec 4, 5:31 pm)
Re: [PATCH v4] sched: automated per session task groups, Nikos Chantziaras, (Sun Dec 5, 4:11 am)
Re: [PATCH v4] sched: automated per session task groups, Mike Galbraith, (Sun Dec 5, 4:36 am)
Re: [PATCH v4] sched: automated per session task groups, Colin Walters, (Sun Dec 5, 12:22 pm)
Re: [PATCH v4] sched: automated per session task groups, Linus Torvalds, (Sun Dec 5, 1:47 pm)
Re: [PATCH v4] sched: automated per session task groups, Colin Walters, (Sun Dec 5, 3:47 pm)
Re: [PATCH v4] sched: automated per session task groups, Valdis.Kletnieks, (Sun Dec 5, 5:28 pm)
Re: [PATCH v4] sched: automated per session task groups, Peter Zijlstra, (Tue Dec 7, 11:51 am)
[tip:sched/core] sched, autogroup: Fix potential access to ..., tip-bot for Mike Gal ..., (Tue Jan 4, 7:18 am)