Skip to contentSkip to conversation

page fault fastpath: Increasing SMP scalability by introducing pte locks?

DISCUSSION Andi Kleen 2 participants 3 messages Aug 15, 2004 – Aug 16, 2004 3 messages 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]

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

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

Andi Kleen

author
#3 lore raw
Quoted 9 lines · Christoph Lameter
Quoted 4 lines · David S. Miller

Is the read lock in the VMA semaphore enough to let you do the pgd/pmd walking without the page_table_lock? I think it is, but just checking.

That would be great.... May I change the page_table lock to be a read write spinlock instead?

That's probably not a good idea. r/w locks are extremly slow on some architectures. Including ia64.

Just profile cat /proc/net/tcp on a machine with a lot of memory and you'll notice.

-Andi

#4 lore raw
Quoted 9 lines · Andi Kleen
Quoted 7 lines · Christoph Lameter
Quoted 4 lines · David S. Miller

Is the read lock in the VMA semaphore enough to let you do the pgd/pmd walking without the page_table_lock? I think it is, but just checking.

Quoted 5 lines
Quoted 2 lines

That would be great.... May I change the page_table lock to be a read write spinlock instead?

That's probably not a good idea. r/w locks are extremly slow on some architectures. Including ia64.

I was thinking about a read write spinlock not an readwrite semaphore. Look at include/asm-ia64/spinlock.h. The implementations are almost the same. Are you sure about this?

author
#5 lore raw
Quoted 11 lines · Christoph Lameter
Quoted 9 lines · Andi Kleen
Quoted 7 lines · Christoph Lameter
Quoted 4 lines · David S. Miller

Is the read lock in the VMA semaphore enough to let you do the pgd/pmd walking without the page_table_lock? I think it is, but just checking.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

That would be great.... May I change the page_table lock to be a read write spinlock instead?

That's probably not a good idea. r/w locks are extremly slow on some architectures. Including ia64.

I was thinking about a read write spinlock not an readwrite semaphore. Look at include/asm-ia64/spinlock.h.

I was also talking about rw spinlocks.

Quoted 2 lines

The implementations are almost the same. Are you sure about this?

Yes. Try the cat /proc/net/tcp test. It will take >100k read locks for the TCP listen hash table, and on bigger ppc64 and ia64 machines this can take nearly a second of system time.

-Andi