From: Tejun Heo <tj@kernel.org>
To: Daniel Bristot de Oliveira <daolivei@redhat.com>
Cc: linux-kernel@vger.kernel.org, Rik van Riel <riel@redhat.com>,
"Luis Claudio R. Goncalves" <lgoncalv@redhat.com>,
Li Zefan <lizefan@huawei.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Juri Lelli <juri.lelli@arm.com>,
cgroups@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH v2] cgroup: disable irqs while holding css_set_lock
Date: Fri, 17 Jun 2016 01:36:25 -0400 [thread overview]
Message-ID: <20160617053625.GL31708@htj.duckdns.org> (raw)
In-Reply-To: <cf514889-8a4d-1ef4-cf4a-fd1a9b9bcb1d@redhat.com>
Hello,
On Thu, Jun 16, 2016 at 09:12:32PM -0300, Daniel Bristot de Oliveira wrote:
> The use of the irq spin_(un)lock_irq() assumes that the code is always
> called with IRQs enabled. But that is not always true in this case, as
> we call cgroup_free() in the hard IRQ context, and unconditionally
> enable IRQ in this context is a problem. So we need to use irqsave/restore.
>
> Discussing with rostedt, we figured that this needs to be IRQ safe
> (using irqsave/restore) in the PREEMPT RT too, so I need to code a v3 of
> this patch using raw_spin_*() functions to avoid this problem in the -rt
> kernel as well.
>
> Do you see any problems on this?
Use of raw_spin is fine but I don't see how, say, rebind_subsystems()
or cgroup_setup_root() can ever be called with irq disabled given that
they assume sleepable context. Please use _irq and _irqsave
appropriately depending on the circumstances.
Thanks.
--
tejun
next prev parent reply other threads:[~2016-06-17 5:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-07 18:51 [PATCH v2] cgroup: disable irqs while holding css_set_lock Daniel Bristot de Oliveira
2016-06-07 19:30 ` Tejun Heo
2016-06-07 20:05 ` Daniel Bristot de Oliveira
[not found] ` <6f15f27f-3757-5413-4292-1386e95bc278-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-16 21:48 ` Daniel Bristot de Oliveira
[not found] ` <38469b61-7cc5-5fec-4de3-0e9a616dfe95-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-16 22:03 ` Tejun Heo
2016-06-16 22:14 ` Tejun Heo
[not found] ` <20160616221434.GI3262-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2016-06-17 0:12 ` Daniel Bristot de Oliveira
2016-06-17 5:36 ` Tejun Heo [this message]
2016-06-17 19:59 ` Daniel Bristot de Oliveira
[not found] ` <4353aea6-c1e9-80d2-be44-75340d0aaf01-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-22 20:00 ` Daniel Bristot de Oliveira
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=20160617053625.GL31708@htj.duckdns.org \
--to=tj@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=daolivei@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=juri.lelli@arm.com \
--cc=lgoncalv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=riel@redhat.com \
--cc=rostedt@goodmis.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