Linux cgroups development
 help / color / mirror / Atom feed
From: Daniel Bristot de Oliveira <daolivei-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Daniel Bristot de Oliveira
	<daolivei-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Rik van Riel <riel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"Luis Claudio R. Goncalves"
	<lgoncalv-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
	Juri Lelli <juri.lelli-5wv7dgnIgG8@public.gmane.org>,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>
Subject: Re: [PATCH v2] cgroup: disable irqs while holding css_set_lock
Date: Thu, 16 Jun 2016 21:12:32 -0300	[thread overview]
Message-ID: <cf514889-8a4d-1ef4-cf4a-fd1a9b9bcb1d@redhat.com> (raw)
In-Reply-To: <20160616221434.GI3262-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>

On 06/16/2016 07:14 PM, Tejun Heo wrote:
> Except that the patch seems to use irqsave/restore instead of plain
> irq ones in places.  Care to update those?

Hi Tejun,

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?

Thanks! -- Daniel

  parent reply	other threads:[~2016-06-17  0:12 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 [this message]
2016-06-17  5:36                   ` Tejun Heo
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=cf514889-8a4d-1ef4-cf4a-fd1a9b9bcb1d@redhat.com \
    --to=daolivei-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
    --cc=juri.lelli-5wv7dgnIgG8@public.gmane.org \
    --cc=lgoncalv-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=riel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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