* filp usage when cpu busy
@ 2007-11-01 1:56 bc Wong (chimwong)
2007-11-01 4:05 ` Nick Piggin
0 siblings, 1 reply; 3+ messages in thread
From: bc Wong (chimwong) @ 2007-11-01 1:56 UTC (permalink / raw)
To: linux-kernel
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?
Thanks,
bc
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: filp usage when cpu busy
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
0 siblings, 1 reply; 3+ messages in thread
From: Nick Piggin @ 2007-11-01 4:05 UTC (permalink / raw)
To: bc Wong (chimwong); +Cc: linux-kernel
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).
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: filp usage when cpu busy
2007-11-01 4:05 ` Nick Piggin
@ 2007-11-01 17:51 ` bc Wong
0 siblings, 0 replies; 3+ messages in thread
From: bc Wong @ 2007-11-01 17:51 UTC (permalink / raw)
To: Nick Piggin; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-01 18:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox