Re: 2.6.21-rc suspend regression: sysfs deadlock

Hugh Dickins
2007-03-15T12:31:54Z

On Thu, 15 Mar 2007, Cornelia Huck wrote:
> On Wed, 14 Mar 2007 15:23:10 -0400 (EDT),
> Alan Stern <stern@rowland.harvard.edu> wrote:
> >
> > sysfs_work_struct is too generic; other parts of sysfs might also want to
> > use workqueues for different purposes.
>
> > I don't like calling it "delayed"-anything, because the operations aren't
> > necessarily delayed! On an SMP system they might even execute before the
> > sysfs_access_in_other_task() call returns. (Although the two examples we
> > have so far can't do that because of lock contention.)
>
> Sure. But then you shouldn't refer to "delay" in the comments for the
> functions as well :)
>
> > The major feature added here is that the work takes place in a different
> > task's context, not that it is delayed. Hence the choice of names.
>
> Hm. Perhaps device_schedule_access()?

It's really none of my business, I'm merely the reporter the
deadlock being fixed, and I don't know my way around sysfs at all ...

... but I have to say I share your discomfort with Alan's
"sysfs_access_in_other_task" naming, it sounded very weird to me.

Quite apart from this mysterious "other task", I don't understand
"access" either.

Perhaps "defer" would best capture the idea of another-task and
maybe-delay? sysfs_defer_work(), struct sysfs_deferred_work?

Hugh