why INITIAL_JIFFIES is -300 * HZ?

2010-04-19 Thread Nagaprabhanjan Bellari
I am curious to know why jiffies is initialized with INITIAL_JIFFIES which is -300 * HZ? It is mentioned in the source that jiffies, when initialized with this value, will make it overflow in 5 minutes. Can somebody tell me how it helps in dealing with jiffy overflow issues at a later point in tim

A query regarding sysrq-trigger

2010-01-15 Thread Nagaprabhanjan Bellari
Hi, We had a problem where we were trying to debug why events/0 was taking 98% of CPU time. I found that writing a ‘t’ to /proc/sysrq-trigger will dump the stack traces of all processes. Unfortunately, events/0 was shown as running and no stack trace was dumped for it: == ksoftirqd/0 S

Re: copy-on-write overhead

2010-01-10 Thread Nagaprabhanjan Bellari
> > Hi Joel... > > Manish is right. Please notice that he talked about "why do we do copy > on write (COW) if soon after child is forked, it quickly does exec()". > So yes, COW has overhead, but imagine if parent ran first. COW will be > triggered for parent address space, then child soon runs too.

Re: page cache query

2009-12-16 Thread Nagaprabhanjan Bellari
On Wed, Dec 16, 2009 at 8:32 PM, Nagaprabhanjan Bellari wrote: > I learn a trick from Con Kolivas to purge cache...hopefully I recall >> it correctly: >> # tail /dev/zero >> >> wait for few seconds...watch out to not make it OOMand most likely >> some (

Re: page cache query

2009-12-16 Thread Nagaprabhanjan Bellari
> > I learn a trick from Con Kolivas to purge cache...hopefully I recall > it correctly: > # tail /dev/zero > > wait for few seconds...watch out to not make it OOMand most likely > some (if not at all) page cache will be purged out. > Are you sure? Does page cache get involved at all while rea

Re: page cache query

2009-12-11 Thread Nagaprabhanjan Bellari
One can also write do a `echo 1 > /proc/sys/vm/drop_cache` to purge the page cache. -nagp On Sat, Dec 12, 2009 at 12:50 PM, Joel Fernandes wrote: > > My question is why the cache is growing even after O_SYNC flag? Even > > fsync does not help. But deleting file freeing the cache. > > > > Try O_D

Need some help in interpreting a code snippet

2009-12-10 Thread Nagaprabhanjan Bellari
The code snippet is in linux/kernel/softirq.c:__do_softirq(): == do { if (pending & 1) { int preempt_count = preempt_count(); h->action(h); if (preempt_count != preempt_count()) { printk(KERN_CRIT "BUG: softirq: %p, %x,%x\n",

Re: Ioctls for data transfer

2009-09-29 Thread Nagaprabhanjan Bellari
On Tue, Sep 29, 2009 at 3:34 PM, Leonidas . wrote: > > > On Tue, Sep 29, 2009 at 3:31 PM, Nagaprabhanjan Bellari < > nagp@gmail.com> wrote: > >> If you take /proc filesystem for example, you can write something to it >> and can read something from it

Re: Ioctls for data transfer

2009-09-29 Thread Nagaprabhanjan Bellari
If you take /proc filesystem for example, you can write something to it and can read something from it depending on what you last wrote. -nagp On Fri, Sep 18, 2009 at 9:46 PM, Peter Teoh wrote: > On Fri, Sep 18, 2009 at 9:07 PM, Leonidas . wrote: > > > > > > On Fri, Sep 18, 2009 at 5:36 AM, Pet