All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
To: Roy Huang <royhuang9@gmail.com>
Cc: linux-kernel@vger.kernel.org, aubreylee@gmail.com,
	nickpiggin@yahoo.com.au, torvalds@osdl.org
Subject: Re: [PATCH] Provide an interface to limit total page cache.
Date: Mon, 15 Jan 2007 17:27:25 +0530	[thread overview]
Message-ID: <45AB6C25.1080804@linux.vnet.ibm.com> (raw)
In-Reply-To: <afe668f90701150139q26e41720lf06d6ee445a917b0@mail.gmail.com>


Roy Huang wrote:
> A patch provide a interface to limit total page cache in
> /proc/sys/vm/pagecache_ratio. The default value is 90 percent. Any
> feedback is appreciated.

[snip]

I tried to run your patch on PPC64 SMP machine, unfortunately kswapd
crashes the kernel when the pagecache limit is exceeded!

->dd if=/dev/zero of=/tmp/foo bs=1M count=1200
cpu 0x0: Vector: 300 (Data Access) at [c0000000012d7ad0]
    pc: c0000000000976ac: .kswapd+0x3a4/0x4f0
    lr: c0000000000976ac: .kswapd+0x3a4/0x4f0
    sp: c0000000012d7d50
   msr: 8000000000009032
   dar: 0
 dsisr: 42000000
  current = 0xc00000000fed7040
  paca    = 0xc00000000063fb80
    pid   = 134, comm = kswapd0
------------[ cut here ]------------
enter ? for help
[c0000000012d7ee0] c000000000069150 .kthread+0x124/0x174
[c0000000012d7f90] c0000000000247b4 .kernel_thread+0x4c/0x68
0:mon>

Steps to recreate fail:

# sync
# echo 1 > /proc/sys/vm/drop_caches
MemTotal:      1014584 kB
MemFree:        905536 kB
Buffers:          3232 kB
Cached:          57628 kB
SwapCached:          0 kB
Active:          47664 kB
Inactive:        33160 kB
SwapTotal:     1526164 kB
SwapFree:      1526164 kB
Dirty:             108 kB
Writeback:           0 kB
AnonPages:       19976 kB
Mapped:          15084 kB
Slab:            19724 kB
SReclaimable:     8536 kB
SUnreclaim:      11188 kB
PageTables:        972 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:   2033456 kB
Committed_AS:    87884 kB
VmallocTotal: 8589934592 kB
VmallocUsed:      2440 kB
VmallocChunk: 8589932152 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
Hugepagesize:    16384 kB

# echo 50 > /proc/sys/vm/pagecache_ratio
# dd if=/dev/zero of=/tmp/foo bs=1M count=1200

Basically fill pagecache with overlimit dirty file pages and check
if the reclaim happened and the limit was not exceeded.

--Vaidy




  parent reply	other threads:[~2007-01-15 11:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-15  9:39 [PATCH] Provide an interface to limit total page cache Roy Huang
2007-01-15 11:01 ` Balbir Singh
2007-01-16  2:34   ` Roy Huang
2007-01-16  9:57     ` Balbir Singh
2007-01-15 11:57 ` Vaidyanathan Srinivasan [this message]
2007-01-16  2:40   ` Roy Huang
2007-01-17 14:55     ` Vaidyanathan Srinivasan
2007-01-18  7:56 ` Eric W. Biederman
2007-01-18 14:00 ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45AB6C25.1080804@linux.vnet.ibm.com \
    --to=svaidy@linux.vnet.ibm.com \
    --cc=aubreylee@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=royhuang9@gmail.com \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.