public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Dilger, Andreas" <andreas.dilger@intel.com>
To: Oleg Nesterov <oleg@redhat.com>, Peng Tao <bergwolf@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	"Drokin, Oleg" <oleg.drokin@intel.com>
Subject: Re: [PATCH RFC] sched: introduce add_wait_queue_exclusive_head
Date: Wed, 19 Mar 2014 19:44:29 +0000	[thread overview]
Message-ID: <CF4F4C6F.9A880%andreas.dilger@intel.com> (raw)
In-Reply-To: <20140319173330.GA11923@redhat.com>

On 2014/03/19, 11:33 AM, "Oleg Nesterov" <oleg@redhat.com> wrote:
>On 03/19, Peng Tao wrote:
>>
>> On Wed, Mar 19, 2014 at 12:23 AM, Oleg Nesterov <oleg@redhat.com> wrote:
>> >
>> > Firtsly, cfs_block_sigs/cfs_block_sigsinv/etc are not exactly right,
>> > they need set_current_blocked(). And you can read "old" lockless.
>> >
>> It seems that set_current_blocked() is not exported. Can we ask to
>>export it?
>
>Why not. If you are going to change this code to use
>set_current_blocked(), I'd suggest you to send the "export
>set_current_blocked" patch in series. Otherwise, if it is sent
> separately, your change will depend on another tree.
>
>Or you can use sigprocmask(). Actually it should die, but this won't
>happen soon and it is already exported.
>
>> And looking at other similar places like coda_block_signals(),
>
>Yes, it can have much more users.
>
>But note that set_current_blocked() can't help you to really block
>SIGKILL anyway.
>
>Could you explain why __l_wait_event() can't use TASK_UNINTERRUPTIBLE
>instead of cfs_block_sigsinv(0) ?

The original reason for l_wait_event() not using TASK_UNINTERRUPTIBLE
is to avoid the load on the server continually being "num_service_threads"
regardless of whether they are actually doing something or not.  We
added various cases for periodic wakeups and such afterward.

l_wait_event() was originally developed for 2.4 kernels, so there may
well be better primitives to use today.

I'd be happy to move toward replacing l_wait_event() with kernel
primitives if possible, but we need to ensure that this is tested
sufficiently since it can otherwise be a source of hard-to-find bugs.

Cheers, Andreas
-- 
Andreas Dilger

Lustre Software Architect
Intel High Performance Data Division



  reply	other threads:[~2014-03-19 19:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-18 13:10 [PATCH RFC] sched: introduce add_wait_queue_exclusive_head Peng Tao
2014-03-18 13:33 ` Peter Zijlstra
2014-03-18 13:51   ` Peng Tao
2014-03-18 14:05     ` Peter Zijlstra
2014-03-18 14:44       ` Peng Tao
2014-03-18 16:23         ` Oleg Nesterov
2014-03-19  2:22           ` Peng Tao
2014-03-19 17:33             ` Oleg Nesterov
2014-03-19 19:44               ` Dilger, Andreas [this message]
2014-03-19 19:55                 ` Peter Zijlstra
2014-03-20  7:06                   ` Dilger, Andreas
2014-03-20 18:49                   ` Oleg Nesterov
2014-03-18 15:47       ` Oleg Nesterov
2014-03-19  2:17         ` Peng Tao
     [not found]           ` <20140319164907.GA10113@redhat.com>
2014-03-19 16:57             ` Peter Zijlstra
2014-03-19 17:19               ` Oleg Nesterov
2014-03-20 17:51                 ` [PATCH 0/2] wait: introduce WQ_FLAG_EXCLUSIVE_HEAD Oleg Nesterov
2014-03-20 17:51                   ` [PATCH 1/2] wait: turn "bool exclusive" arg of __wait_event() into wflags Oleg Nesterov
2014-03-20 17:51                   ` [PATCH 2/2] wait: introduce WQ_FLAG_EXCLUSIVE_HEAD Oleg Nesterov
2014-03-21  2:45                   ` [PATCH 0/2] " Dilger, Andreas
2014-03-21 18:49                     ` Oleg Nesterov

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=CF4F4C6F.9A880%andreas.dilger@intel.com \
    --to=andreas.dilger@intel.com \
    --cc=bergwolf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=oleg.drokin@intel.com \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.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