Skip to contentSkip to conversation

POSIX personality

RFC Peter Chubb 1 participant 1 message May 21, 2002 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Andi" == Andi Kleen <[email protected]> writes:

Quoted 10 lines · Andi> Dave McCracken <[email protected]> writes:
Quoted 10 lines

--On Tuesday, May 21, 2002 01:52:37 PM -0700 Linus Torvalds

Quoted 1 line · <[email protected]> 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