lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1162427450.12419.184.camel@localhost.localdomain>
Date:	Wed, 01 Nov 2006 16:30:50 -0800
From:	Matt Helsley <matthltc@...ibm.com>
To:	Paul Menage <menage@...gle.com>
Cc:	vatsa@...ibm.com, Pavel Emelianov <xemul@...nvz.org>,
	dev@...nvz.org, sekharan@...ibm.com,
	ckrm-tech@...ts.sourceforge.net, balbir@...ibm.com,
	haveblue@...ibm.com, linux-kernel@...r.kernel.org, pj@....com,
	dipankar@...ibm.com, rohitseth@...gle.com
Subject: Re: [ckrm-tech] [RFC] Resource Management - Infrastructure choices

On Wed, 2006-11-01 at 15:50 -0800, Paul Menage wrote:
> On 11/1/06, Matt Helsley <matthltc@...ibm.com> wrote:
> > On Wed, 2006-11-01 at 23:42 +0530, Srivatsa Vaddagiri wrote:
> > > On Wed, Nov 01, 2006 at 12:30:13PM +0300, Pavel Emelianov wrote:
> >
> > <snip>
> >
> > > > >   - Support movement of all threads of a process from one group
> > > > >     to another atomically?
> > > >
> > > > I propose such a solution: if a user asks to move /proc/<pid>
> > > > then move the whole task with threads.
> > > > If user asks to move /proc/<pid>/task/<tid> then move just
> > > > a single thread.
> > > >
> > > > What do you think?
> > >
> > > Isnt /proc/<pid> listed also in /proc/<pid>/task/<tid>?
> > >
> > > For ex:
> > >
> > >       # ls /proc/2906/task
> > >       2906  2907  2908  2909
> > >
> > > 2906 is the main thread which created the remaining threads.
> > >
> > > This would lead to an ambiguity when user does something like below:
> > >
> > >       echo 2906 > /some_res_file_system/some_new_group
> > >
> > > Is he intending to move just the main thread, 2906, to the new group or
> > > all the threads? It could be either.
> > >
> > > This needs some more thought ...
> >
> >         I thought the idea was to take in a proc path instead of a single
> > number. You could then distinguish between the whole thread group and
> > individual threads by parsing the string. You'd move a single thread if
> > you find both the tgid and the tid. If you only get a tgid you'd move
> > the whole thread group. So:
> >
> > <pid>                   -> if it's a thread group leader move the whole
> >                            thread group, otherwise just move the thread
> > /proc/<tgid>            -> move the whole thread group
> > /proc/<tgid>/task/<tid> -> move the thread
> >
> >
> >         Alternatives that come to mind are:
> >
> > 1. Read a flag with the pid
> > 2. Use a special file which expects only thread groups as input
> 
> I think that having a "tasks" file and a "threads" file in each
> container directory would be a clean way to handle it:
> 
> "tasks" : read/write complete process members
> "threads" : read/write individual thread members
> 
> Paul

Seems like a good idea to me -- that certainly avoids complex parsing.

Cheers,
	-Matt Helsley

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ