Andi> Dave McCracken <dmccr@us.ibm.com> writes:
>> --On Tuesday, May 21, 2002 01:52:37 PM -0700 Linus Torvalds
>> <torvalds@transmeta.com> wrote:
>>
>> > I don't see any reason to start using some fixed-mode semantics
>> without > seeing some stronger arguments on exactly why that would
>> be a good idea. > We have used up 11 of 24 bits (and more can be
>> made available) over the > last five years, and there are no
>> obvious inefficiencies that I can see.
>>
>> Ok, sounds reasonable. I'll add the bits as I go, then.
Andi> One reason for it would be that it would be more efficient. All
Andi> the various shared state needed for POSIX thread group emulation
Andi> could be put into a single structure with a single reference
Andi> count.
Andi> With clone flags you need one pointer in task_struct per flag
Andi> and handling of the reference count for each data structure and
Andi> allocation/freeing from various slabs for a real fork.
Andi> (basically lots of atomic operations at fork time + bloating of
Andi> task_struct)
With one minor restriction, you could do it the same way SGI's IRIX
handled sproc() --- have a struct shared that was pointed to by the
task structure, that was then partially or completely populated
depending on the sharing flags. The struct shared can also have a
list of tasks that share stuff in it. Each task has a set of flags to
say what's being shared.
You'd have to disallow sharing things that a task's parent doesn't
share with the task, if the parent and the child are part of the same
share group.
Peter C
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/