All of lore.kernel.org
 help / color / mirror / Atom feed
From: bc Wong <bcwong@cisco.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: filp usage when cpu busy
Date: Thu, 01 Nov 2007 10:51:30 -0700	[thread overview]
Message-ID: <472A1222.70103@cisco.com> (raw)
In-Reply-To: <200711011505.15751.nickpiggin@yahoo.com.au>

Nick Piggin wrote:
> On Thursday 01 November 2007 12:56, bc Wong (chimwong) wrote:
>> Hi,
>>
>> With 2.6.16 x86_64 on a 4 core machine, I noticed
>> that the filp usage (according to /proc/slabinfo)
>> shoots up and keeps on increasing sharply when one
>> of the CPUs is (1) locked up, or (2) very busy
>> doing a lot of printk()'s with KERN_EMERG.
>>
>> In the case of (1), it's permanent until it runs
>> out of memory eventually. For (2), it's temporary;
>> filp count comes back down when the printk()'s are
>> done.
>>
>> I can't think of any relationship between a busy/
>> locked-up CPU and filp count. The system is still
>> functional. New short-lived processes kept being
>> created, but the overall number of processes is
>> stable.
>>
>> Does anyone know why filp count would go up like
>> that?
> 
> Yeah, it's probably because filp structures are freed by
> RCU, and if you have a locked up CPU then it can't go
> through a quiescent state so RCU stops freeing your filps.
> 
> If you add some cond_resched()s to your code, you should
> find that RCU will force a reschedule and things will work
> (actually, for 2.6.16, I'm not sure if RCU had the code to
> force a reschedule... it's force_quiescent_state() in
> kernel/rcupdate.c upstream).

Thanks! You're absolutely right. Btw, 2.6.16 does
have force_quiescent_state().

Cheers,
bc

      reply	other threads:[~2007-11-01 18:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-01  1:56 filp usage when cpu busy bc Wong (chimwong)
2007-11-01  4:05 ` Nick Piggin
2007-11-01 17:51   ` bc Wong [this message]

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=472A1222.70103@cisco.com \
    --to=bcwong@cisco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /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.