public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizefan@huawei.com>
To: Tejun Heo <tj@kernel.org>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>,
	LKML <linux-kernel@vger.kernel.org>,
	Cgroups <cgroups@vger.kernel.org>
Subject: Re: [PATCH] cgroup: make cgrp->event_list_lock irqsafe
Date: Wed, 6 Mar 2013 15:15:59 +0800	[thread overview]
Message-ID: <5136ED2F.8080400@huawei.com> (raw)
In-Reply-To: <CAOS58YN9K9OrvvdZjUV9dFOP=SpJYgeyPp0Y5yipNE47osqXpQ@mail.gmail.com>

On 2013/3/6 15:02, Tejun Heo wrote:
> On Tue, Mar 5, 2013 at 11:00 PM, Li Zefan <lizefan@huawei.com> wrote:
>>> Why should wqh->lock be hard-irq-safe?  Is it actually grabbed from
>>> irq context?
>>
>> becase cgroup_event_wake() is a callback to a wait queue, and it's wake_up()
>> that acquires wqh->lock with irq disabled.
> 
> So, acquiring a lock with irq disabled doesn't make it a irq lock.
> Being grabbed *from* irq handler makes it a irq lock. Would the
> wake_up() happen from irq handler?
> 

wqh->lock is used through out fs/eventfd.c. I don't know if currently there's
any kernel user using eventfd APIs in an irq handler, but at least that should
be allowed.

wake_up() is also allowed to be called from irq handler?

"allowed" should be enough reason we forbid:

	spin_lock_irqsave(...)
	spin_lock(...)


  reply	other threads:[~2013-03-06  7:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06  3:28 [PATCH] cgroup: make cgrp->event_list_lock irqsafe Li Zefan
2013-03-06  6:22 ` Tejun Heo
2013-03-06  7:00   ` Li Zefan
2013-03-06  7:02     ` Tejun Heo
2013-03-06  7:15       ` Li Zefan [this message]
2013-03-06  7:21         ` Tejun Heo
2013-03-06  7:23           ` Tejun Heo

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=5136ED2F.8080400@huawei.com \
    --to=lizefan@huawei.com \
    --cc=cgroups@vger.kernel.org \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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