All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Jeff Layton <jlayton@redhat.com>
Cc: Steve French <sfrench@us.ibm.com>,
	Dave Kleikamp <shaggy@linux.vnet.ibm.com>,
	linux-cifs-client@lists.samba.org, linux-fsdevel@vger.kernel.org
Subject: Re: OOM kills when running fsstress on CIFS
Date: Tue, 25 May 2010 21:16:39 +1000	[thread overview]
Message-ID: <20100525111639.GM5087@laptop> (raw)
In-Reply-To: <20100525065705.5a5d95e1@corrin.poochiereds.net>

On Tue, May 25, 2010 at 06:57:05AM -0400, Jeff Layton wrote:
> Since 2.6.34, I've been able to consistently reproduce OOM kills when running fsstress (from the LTP suite) on CIFS. I spent some time yesterday and bisected it down to this patch:
> 
> ---------------------[snip]---------------------
> commit 315e995c63a15cb4d4efdbfd70fe2db191917f7a
> Author: Nick Piggin <npiggin@suse.de>
> Date:   Wed Apr 21 03:18:28 2010 +0000
> 
>     [CIFS] use add_to_page_cache_lru
>     
>     add_to_page_cache_lru is exported, so it should be used. Benefits over
>     using a private pagevec: neater code, 128 bytes fewer stack used, percpu
>     lru ordering is preserved, and finally don't need to flush pagevec
>     before returning so batching may be shared with other LRU insertions.
>     
>     Signed-off-by: Nick Piggin <npiggin@suse.de>
>     Reviewed-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
>     Signed-off-by: Steve French <sfrench@us.ibm.com>
> ---------------------[snip]---------------------
> 
> Here's how I've been reproducing it:
> 
> Mount up a samba share with -o sec=krb5i,nounix,noserverino
> 
> Run: fsstress -d /path/to/dir/on/cifs/ -n 1000 -l0 -p8
> 
> ...within an hour or two, I start getting OOM kills. After backing out
> the patch above, I was able to run the test overnight. I'm not sure yet
> what the actual problem is, but there seems to be something wrong with
> that patch.
> 
> Thoughts?

Yep, it's my fault. The problem is the refcounting. Previously the
code hands off the references to the LRU, wheras now the lru takes
a new reference. (the other filesystems converted to use this
function seemed to more conventionally open-code lru_cache_add).

Can we get rid of a refcount increment anywhere? Otherwise we'll
need to just drop the references after adding the pages.


  reply	other threads:[~2010-05-25 11:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25 10:57 OOM kills when running fsstress on CIFS Jeff Layton
2010-05-25 11:16 ` Nick Piggin [this message]
2010-05-25 11:49   ` Jeff Layton
2010-05-25 11:54     ` Nick Piggin
2010-05-25 16:32       ` Jeff Layton

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=20100525111639.GM5087@laptop \
    --to=npiggin@suse.de \
    --cc=jlayton@redhat.com \
    --cc=linux-cifs-client@lists.samba.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=sfrench@us.ibm.com \
    --cc=shaggy@linux.vnet.ibm.com \
    /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.