LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Roy Huang" <royhuang9@gmail.com>
To: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.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: Tue, 16 Jan 2007 10:40:52 +0800	[thread overview]
Message-ID: <afe668f90701151840tc8d7608sadccb3e39017d1ed@mail.gmail.com> (raw)
In-Reply-To: <45AB6C25.1080804@linux.vnet.ibm.com>

The possible cause is a bug in kswapd thread, or shrink_all_memory
cannot be called in kswapd thread.

On 1/15/07, Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> wrote:
>
> 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
>
>
>
>

  reply	other threads:[~2007-01-16  2:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-15  9:39 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
2007-01-16  2:40   ` Roy Huang [this message]
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=afe668f90701151840tc8d7608sadccb3e39017d1ed@mail.gmail.com \
    --to=royhuang9@gmail.com \
    --cc=aubreylee@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=svaidy@linux.vnet.ibm.com \
    --cc=torvalds@osdl.org \
    --subject='Re: [PATCH] Provide an interface to limit total page cache.' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).