Skip to contentSkip to conversation

2.4.23aa2 (bugfixes and important VM improvements for the high end)

DISCUSSION Rik van Riel 2 participants 3 messages Mar 4, 2004 – Mar 5, 2004 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 7 lines · Andrea Arcangeli
Quoted 3 lines · Rik van Riel

All the CPUs use the _same_ mm_struct in kernel space, so all VM operations inside the kernel are effectively single threaded.

so what, the 3:1 has the same bottleneck too.

Not true, in the 3:1 split every process has its own mm_struct and they all happen to share the top GB with kernel stuff. You can do a copy_to_user on multiple CPUs efficiently.

Quoted 3 lines

or maybe you mean the page_table_lock hold during copy-user that Andrew mentioned? (copy-user doesn't mean "all VM operations" not sure if you meant this or the usual locking of every 2.4/2.6 kernel out there)

True, there are some other operations. However, when you consider the fact that copy-user operations are needed for so many things they are the big bottleneck.

Making it possible to copy things to and from userspace in a lockless way will help performance quite a bit...

Signature · 3 lines
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
#2 lore raw
Quoted 5 lines · Rik van Riel
Quoted 3 lines

or maybe you mean the page_table_lock hold during copy-user that Andrew mentioned? (copy-user doesn't mean "all VM operations" not sure if you meant this or the usual locking of every 2.4/2.6 kernel out there)

True, there are some other operations. However, when

could you name one that is serialized in 4:4 and not in 3:1 with an mm lock? just curious. there are tons of VM operations serialized by the page_table_lock that hurts with threads in 3:1 too. I understood only copy-user needs the additional locking.

Quoted 5 lines

you consider the fact that copy-user operations are needed for so many things they are the big bottleneck.

Making it possible to copy things to and from userspace in a lockless way will help performance quite a bit...

I don't expect an huge speedup but certainly it would be measurable.

#3 lore raw
Quoted 11 lines · Andrea Arcangeli
Quoted 5 lines · Rik van Riel
Quoted 3 lines

or maybe you mean the page_table_lock hold during copy-user that Andrew mentioned? (copy-user doesn't mean "all VM operations" not sure if you meant this or the usual locking of every 2.4/2.6 kernel out there)

True, there are some other operations. However, when

could you name one that is serialized in 4:4 and not in 3:1 with an mm lock? just curious. there are tons of VM operations serialized by the page_table_lock that hurts with threads in 3:1 too. I understood only copy-user needs the additional locking.

Yeah, in case of a threaded workload you're right.

For a many-processes workload the locking optimisations definately made a different, IIRC.

Signature · 3 lines
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan