public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dipankar Sarma <dipankar@in.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: hugh@in.ibm.com, Manfred Spraul <manfred@colorfullife.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Fw: two 2.6.13-rc3-mm3 oddities
Date: Mon, 8 Aug 2005 19:35:36 +0530	[thread overview]
Message-ID: <20050808140536.GC4558@in.ibm.com> (raw)
In-Reply-To: <20050803095644.78b58cb4.akpm@osdl.org>

I am ccing this to linux-kernel for a wider audience.

On Wed, Aug 03, 2005 at 09:56:44AM +1000, Andrew Morton wrote:
> 
> Subject: two 2.6.13-rc3-mm3 oddities
> 
> Just wanted to record a couple of oddities I noticed with 2.6.13-rc3-mm3
> (maybe there before: I hardly tested -mm1 and didn't even download -mm2),
> which have gone away in 2.6.13-rc4-mm1 - so of no great importance, but
> perhaps worth noting in case they resurface later.
> 
> One time my tmpfs-and-looped-tmpfs-kernel-builds collapsed with lots of
> VFS: file-max limit 49778 reached
> messages, which I imagine was a side-effect of the struct file RCU
> patches you've dropped from -rc4-mm1, perhaps a grace period problem.

Hugh, could you please try this with the experimental patch below ?
Manfred, is it safe to decrement nr_files in file_free()
instead of the destructor ? I can't see any problem.

> 
> And repeatably (after a couple of hours or so), on both i386 and x86_64,
> those tests hung waiting on page locks, as if there was a missing
> unlock_page (or a spurious SetPageLocked) somewhere.  I didn't have
> time to do any bisection, but studying source diffs showed no likely
> candidates whatsoever (I did wonder about Nick's __ClearPageDirty,
> but reproduced the problem with that backed out).  As I say, gone
> away (same tests on -rc4-mm1 have run two days), but curious.

Hugh, can you mail me the exact test you run ? I would like to run
it myself and see if I can reproduce it.

Thanks
Dipankar



nr_files need to decremented before the file structure is handed
over to RCU.

Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com>
---


 fs/file_table.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -puN fs/file_table.c~files-fix-nr-files fs/file_table.c
--- linux-2.6.13-rc3-mm3-fixes/fs/file_table.c~files-fix-nr-files	2005-08-08 18:28:12.000000000 +0530
+++ linux-2.6.13-rc3-mm3-fixes-dipankar/fs/file_table.c	2005-08-08 18:32:31.000000000 +0530
@@ -48,10 +48,6 @@ void filp_ctor(void * objp, struct kmem_
 
 void filp_dtor(void * objp, struct kmem_cache_s *cachep, unsigned long dflags)
 {
-	unsigned long flags;
-	spin_lock_irqsave(&filp_count_lock, flags);
-	files_stat.nr_files--;
-	spin_unlock_irqrestore(&filp_count_lock, flags);
 }
 
 static inline void file_free_rcu(struct rcu_head *head)
@@ -62,6 +58,10 @@ static inline void file_free_rcu(struct 
 
 static inline void file_free(struct file *f)
 {
+	unsigned long flags;
+	spin_lock_irqsave(&filp_count_lock, flags);
+	files_stat.nr_files--;
+	spin_unlock_irqrestore(&filp_count_lock, flags);
 	call_rcu(&f->f_rcuhead, file_free_rcu);
 }
 

_

       reply	other threads:[~2005-08-08 14:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20050803095644.78b58cb4.akpm@osdl.org>
2005-08-08 14:05 ` Dipankar Sarma [this message]
2005-08-08 15:26   ` Fw: two 2.6.13-rc3-mm3 oddities Hugh Dickins
2005-08-08 16:31   ` Manfred Spraul
2005-08-08 16:46     ` Dipankar Sarma
2005-08-08 17:25       ` Andrew Morton
2005-08-08 18:03         ` Dipankar Sarma

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=20050808140536.GC4558@in.ibm.com \
    --to=dipankar@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=hugh@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox