public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Amerigo Wang <amwang@redhat.com>
Cc: linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Jens Axboe <jens.axboe@oracle.com>,
	Miles Lane <miles.lane@gmail.com>,
	Larry Finger <Larry.Finger@lwfinger.net>,
	Hugh Dickins <hugh.dickins@tiscali.co.uk>,
	akpm@linux-foundation.org
Subject: Re: [RFC Patch] sysfs: add marks for mutable sysfs files
Date: Wed, 10 Feb 2010 09:51:24 -0800	[thread overview]
Message-ID: <m1aavh3roj.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20100210065754.3713.8997.sendpatchset@localhost.localdomain> (Amerigo Wang's message of "Wed\, 10 Feb 2010 01\:54\:27 -0500")

Amerigo Wang <amwang@redhat.com> writes:

> NOTE: This patch is only a draft, not ready to be taken.
>
> This fixes all the s_active related bogus lockdep warnings that I received,
> I already tested it, it works fine for cpu hotplug, I/O scheduler switch,
> and suspend.
>
> This patch introduces sever sysfs/kobject interfaces to add mutable
> sysfs files or kobjects, those files could be removed by the kernel
> during some event, e.g. cpu hotplug. All of this kind of sysfs files
> should use these API's, to avoid the deadlock warnings.
>
> I am still not sure if this is the best fix.
>
> Please comment.

mutable as you describe it happens to be the common case, and that
class of files is not free from this class of problem.

Your patch is actively wrong if it solves the i/o scheduler issue,
as those files are in fact mutable by your definition, block devices
are hot pluggable.

Having a special case for permanent sysfs files, that we refuse to
delete would be reasonable, but it certainly does not cover
everything.

Eric

  parent reply	other threads:[~2010-02-10 17:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-10  6:54 [RFC Patch] sysfs: add marks for mutable sysfs files Amerigo Wang
2010-02-10  7:00 ` Cong Wang
2010-02-10 17:51 ` Eric W. Biederman [this message]
2010-02-15  6:35   ` Cong Wang

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=m1aavh3roj.fsf@fess.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=akpm@linux-foundation.org \
    --cc=amwang@redhat.com \
    --cc=gregkh@suse.de \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hugh.dickins@tiscali.co.uk \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miles.lane@gmail.com \
    --cc=peterz@infradead.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