Skip to contentSkip to conversation

2.5.33-mm1

DISCUSSION Andrew Morton 4 participants 8 messages Sep 3, 2002 – Sep 4, 2002 Memory management

lore
Share & tools
lore
#0 lore raw

http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.33/2.5.33-mm1/

Seven new patches - mostly just code cleanups.

+slablru-speedup.patch

A patch to improve slablru cpu efficiency. Ed is redoing this.

+oom-fix.patch

Fix an OOM-killing episode on large highmem machines.

+tlb-cleanup.patch

Remove debug code from the tlb_gather rework, tidy up a couple of things.

+dump-stack.patch

Arch-independent stack-dumping debug function

+madvise-move.patch

Move the madvise implementation out of filemap.c into madvise.c

+split-vma.patch

Rationalise lots of the VMA-manipulation code.

+buffer-ops-move.patch

Move the buffer_head IO functions out of ll_rw_blk.c, into buffer.c

scsi_hack.patch
Fix block-highmem for scsi

ext3-htree.patch
Indexed directories for ext3

rmap-locking-move.patch
move rmap locking inlines into their own header file.

discontig-paddr_to_pfn.patch
Convert page pointers into pfns for i386 NUMA

discontig-setup_arch.patch
Rework setup_arch() for i386 NUMA

discontig-mem_init.patch
Restructure mem_init for i386 NUMA

discontig-i386-numa.patch
discontigmem support for i386 NUMA

cleanup-mem_map-1.patch
Clean up lots of open-coded uese of mem_map[]. For ia32 NUMA

zone-pages-reporting.patch
Fix the boot-time reporting of each zone's available pages

enospc-recovery-fix.patch
Fix the __block_write_full_page() error path.

fix-faults.patch
Back out the initial work for atomic copy_*_user()

spin-lock-check.patch
spinlock/rwlock checking infrastructure

refill-rate.patch
refill the inactive list more quickly

copy_user_atomic.patch

kmap_atomic_reads.patch
Use kmap_atomic() for generic_file_read()

kmap_atomic_writes.patch
Use kmap_atomic() for generic_file_write()

throttling-fix.patch
Fix throttling of heavy write()rs.

dirty-state-accounting.patch
Make the global dirty memory accounting more accurate

rd-cleanup.patch
Cleanup and fix the ramdisk driver (doesn't work right yet)

discontig-cleanup-1.patch
i386 discontigmem coding cleanups

discontig-cleanup-2.patch
i386 discontigmem cleanups

writeback-thresholds.patch
Downward adjustments to the default dirtymemory thresholds

buffer-strip.patch
Limit the consumption of ZONE_NORMAL by buffer_heads

rmap-speedup.patch
rmap pte_chain space and CPU reductions

wli-highpte.patch
Resurrect CONFIG_HIGHPTE - ia32 pagetables in highmem

readv-writev.patch
O_DIRECT support for readv/writev

slablru.patch
age slab pages on the LRU

slablru-speedup.patch
slablru optimisations

llzpr.patch
Reduce scheduling latency across zap_page_range

buffermem.patch
Resurrect buffermem accounting

config-PAGE_OFFSET.patch
Configurable kenrel/user memory split

lpp.patch
ia32 huge tlb pages

ext3-sb.patch
u.ext3_sb -> generic_sbp

oom-fix.patch
Fix an OOM condition on big highmem machines

tlb-cleanup.patch
Clean up the tlb gather code

dump-stack.patch
arch-neutral dump_stack() function

madvise-move.patch
move mdavise implementation into mm/madvise.c

split-vma.patch
VMA splitting patch

buffer-ops-move.patch
Move submit_bh() and ll_rw_block() into fs/buffer.c

#1 lore raw
Quoted 5 lines · Andrew Morton

http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.33/2.5.33-mm1/
Seven new patches - mostly just code cleanups. +slablru-speedup.patch
A patch to improve slablru cpu efficiency. Ed is redoing this.

count_list() appears to be the largest consumer of cpu after this is done, or so say the profiles after running updatedb by hand on 2.5.33-mm1 on a 900MHz P-III T21 Thinkpad with 256MB of RAM.

4608 __rdtsc_delay 164.5714

  2627 __generic_copy_to_user                    36.4861
  2401 count_list                                42.8750
  1415 find_inode_fast                           29.4792

1325 do_anonymous_page 3.3801

It also looks like there's either a bit of internal fragmentation or a missing kmem_cache_reap() somewhere:

  ext3_inode_cache:    20001KB    51317KB   38.97
      dentry_cache:     4734KB    18551KB   25.52
   radix_tree_node:     1811KB     1923KB   94.20
       buffer_head:     1132KB     1378KB   82.12

It does stay quite a bit more nicely bounded than without slablru though.

Maybe it's old news. Just thought I'd try running a test on something tiny for once. (new kbd/mouse config options were a PITA BTW)

Cheers,
Bill
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/

#2 lore raw
Quoted 3 lines · William Lee Irwin III

count_list() appears to be the largest consumer of cpu after this is done, or so say the profiles after running updatedb by hand on 2.5.33-mm1 on a 900MHz P-III T21 Thinkpad with 256MB of RAM.

                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Quoted 2 lines

Maybe it's old news. Just thought I'd try running a test on something tiny for once. (new kbd/mouse config options were a PITA BTW)

You've got an interesting idea of tiny ;)

Somehow I have the idea that the Linux users with 64 MB of RAM or less have _more_ memory together than what's present in all the >8GB Linux servers together...

regards,

Rik

Signature · 3 lines
Bravely reimplemented by the knights who say "NIH".

http://www.surriel.com/		http://distro.conectiva.com/
#3 lore raw
In reply to William Lee Irwin III
Quoted 11 lines · William Lee Irwin III
Quoted 5 lines · Andrew Morton

http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.33/2.5.33-mm1/
Seven new patches - mostly just code cleanups. +slablru-speedup.patch
A patch to improve slablru cpu efficiency. Ed is redoing this.

count_list() appears to be the largest consumer of cpu after this is done, or so say the profiles after running updatedb by hand on 2.5.33-mm1 on a 900MHz P-III T21 Thinkpad with 256MB of RAM.

That's my /proc/meminfo:buffermem counter-upper. I said it would suck ;) Probably count_list(&inode_unused) can just be nuked. I don't think blockdev inodes ever go onto inode_unused.

Quoted 6 lines

4608 __rdtsc_delay 164.5714

  2627 __generic_copy_to_user                    36.4861
  2401 count_list                                42.8750
  1415 find_inode_fast                           29.4792

1325 do_anonymous_page 3.3801

Quoted 7 lines

It also looks like there's either a bit of internal fragmentation or a missing kmem_cache_reap() somewhere:

  ext3_inode_cache:    20001KB    51317KB   38.97
      dentry_cache:     4734KB    18551KB   25.52
   radix_tree_node:     1811KB     1923KB   94.20
       buffer_head:     1132KB     1378KB   82.12

That's really outside the control of slablru. It's determined by the cache-specific LRU algorithms, and the allocation order.

You'll need to look at the second-last and third-last columns in /proc/slabinfo (boy I wish that thing had a heading line, or a nice program to interpret it):

ext3_inode_cache 959 2430 448 264 270 1

That's 264 pages in use, 270 total. If there's a persistent gap between these then there is a problem - could well be that slablru is not locating the pages which were liberated by the pruning sufficiently quickly.

Calling kmem_cache_reap() after running the pruners will fix that up.

#4 lore raw
Quoted 6 lines · William Lee Irwin III
Quoted 6 lines

It also looks like there's either a bit of internal fragmentation or a missing kmem_cache_reap() somewhere:

  ext3_inode_cache:    20001KB    51317KB   38.97
      dentry_cache:     4734KB    18551KB   25.52
   radix_tree_node:     1811KB     1923KB   94.20
       buffer_head:     1132KB     1378KB   82.12
Quoted 10 lines · Andrew Morton

That's really outside the control of slablru. It's determined by the cache-specific LRU algorithms, and the allocation order. You'll need to look at the second-last and third-last columns in /proc/slabinfo (boy I wish that thing had a heading line, or a nice program to interpret it):
ext3_inode_cache 959 2430 448 264 270 1
That's 264 pages in use, 270 total. If there's a persistent gap between these then there is a problem - could well be that slablru is not locating the pages which were liberated by the pruning sufficiently quickly. Calling kmem_cache_reap() after running the pruners will fix that up.

# grep ext3_inode_cache /proc/slabinfo 
ext3_inode_cache   18917  87012    448 7686 9668    1
...
ext3_inode_cache:     8098KB    38052KB   21.28

Looks like a persistent gap from here.

Cheers,
Bill
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/

#5 lore raw
Quoted 10 lines · William Lee Irwin III

...

Quoted 1 line

Calling kmem_cache_reap() after running the pruners will fix that up.

# grep ext3_inode_cache /proc/slabinfo
ext3_inode_cache   18917  87012    448 7686 9668    1
...
ext3_inode_cache:     8098KB    38052KB   21.28

Looks like a persistent gap from here.

OK, thanks. We need to reap those pages up-front rather than waiting for them to come to the tail of the LRU.

What on earth is going on with kmem_cache_reap? Am I missing something, or is that thing 700% overdesigned? Why not just free the darn pages in kmem_cache_free_one()? Maybe hang onto a few pages for cache warmth, but heck.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/

#6 lore raw
In reply to William Lee Irwin III
Quoted 1 line · William Lee Irwin III

William Lee Irwin III <[email protected]>

What are the numbers telling you? Is you test faster or slower with slablru? Does it page more or less? Is looking at the number of objects the way to determine if slablru is helping? I submit the paging and runtimes are much better indications? What do story do they tell?

Thanks
Ed

#7 lore raw
Quoted 1 line · William Lee Irwin III
Quoted 1 line

William Lee Irwin III <[email protected]>

[something must have gotten snipped]

Quoted 5 lines · Ed Tomlinson

What are the numbers telling you? Is you test faster or slower with slablru? Does it page more or less? Is looking at the number of objects the way to determine if slablru is helping? I submit the paging and runtimes are much better indications? What do story do they tell?

Everything else is pretty much fine-tuning. Prior to this there was zero control exerted over the things. Now it's much better behaved with far less "swapping while buttloads of instantly reclaimable slab memory is available" going on. Almost no swapping out of user memory in favor of bloated slabs.

It's really that binary distinction that's most visible.

Cheers,
Bill
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/