public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Hancock <hancockr@shaw.ca>
To: Zhao Forrest <forrest.zhao@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: Why kmem_cache_free occupy CPU for more than 10 seconds?
Date: Fri, 13 Apr 2007 17:26:43 -0600	[thread overview]
Message-ID: <462011B3.5030800@shaw.ca> (raw)
In-Reply-To: <fa.Aj3PE3FoH/kmJ6APQFg2oZN1OFc@ifi.uio.no>

Zhao Forrest wrote:
> These 2 kernel options are turned on by default in my kernel. Here's
> snip from .config
> # CONFIG_PREEMPT_NONE is not set
> CONFIG_PREEMPT_VOLUNTARY=y
> # CONFIG_PREEMPT is not set
> CONFIG_PREEMPT_BKL=y
> CONFIG_NUMA=y
> CONFIG_K8_NUMA=y
> 
>>
>> Does this fix it?
>>
>> --- fs/buffer.c~        2007-02-01 12:00:34.000000000 +0100
>> +++ fs/buffer.c 2007-04-11 12:35:48.000000000 +0200
>> @@ -3029,6 +3029,8 @@ out:
>>                         struct buffer_head *next = bh->b_this_page;
>>                         free_buffer_head(bh);
>>                         bh = next;
>> +
>> +                       cond_resched();
>>                 } while (bh != buffers_to_free);
>>         }
>>         return ret;
>>
> So far I have run the test with patched kernel for 6 rounds, and
> didn't see the soft lockup. I think this patch should fix the problem.
> But what still confused me is that why do we need to invoke
> cond_resched() voluntarily since CONFIG_PREEMPT_VOLUNTARY and
> CONFIG_PREEMPT_BKL are both turned on? From my understanding these 2
> options should make schedule happen even if CPU is under heavy
> load......

No, only CONFIG_PREEMPT will do that.

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


       reply	other threads:[~2007-04-13 23:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.jxja7Ze2HZEPZZ5vd0w5eLsKf88@ifi.uio.no>
     [not found] ` <fa.RbU8KKG9LmOiypCl0DuBe43HL5c@ifi.uio.no>
     [not found]   ` <fa.7mgz+w23+bQoEmP17EX7CoXvAKk@ifi.uio.no>
     [not found]     ` <fa.Iwu0x59X2e1XgdDQWyXObWrcbFY@ifi.uio.no>
     [not found]       ` <fa.Aj3PE3FoH/kmJ6APQFg2oZN1OFc@ifi.uio.no>
2007-04-13 23:26         ` Robert Hancock [this message]
2007-04-11  6:17 Why kmem_cache_free occupy CPU for more than 10 seconds? Zhao Forrest
2007-04-11  6:53 ` Pekka Enberg
2007-04-11  9:14   ` Zhao Forrest
2007-04-11  9:53     ` Paul Jackson
2007-04-11 10:06       ` Peter Zijlstra
2007-04-11 10:10         ` Zhao Forrest
2007-04-11 10:16           ` Peter Zijlstra
2007-04-11 16:23           ` Chuck Ebbert
2007-04-11 16:44           ` Badari Pulavarty
2007-04-11  9:53   ` Zhao Forrest
2007-04-11 10:38     ` Peter Zijlstra
2007-04-11 16:35       ` Ken Chen
2007-04-12  6:17       ` Zhao Forrest
2007-04-11 22:30 ` Andrew Morton
2007-04-12  7:39   ` Peter Zijlstra
2007-04-12  7:55     ` Andrew Morton
2007-04-12  9:19       ` Peter Zijlstra

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=462011B3.5030800@shaw.ca \
    --to=hancockr@shaw.ca \
    --cc=a.p.zijlstra@chello.nl \
    --cc=forrest.zhao@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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