lkml.org 
[lkml]   [2010]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/8] PM: suspend_block: Add driver to access suspend blockers from user-space
Date
On Monday 03 May 2010, Arve Hjønnevåg wrote:
> On Mon, May 3, 2010 at 8:03 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > On Sunday 02 May 2010, Alan Stern wrote:
> >> On Sun, 2 May 2010, Rafael J. Wysocki wrote:
> >>
> >> > Hmm. It doesn't seem to be possible to create two different suspend blockers
> >> > using the same file handle. So, what exactly is a process supposed to do to
> >> > use two suspend blockers at the same time?
> >>
> >> Open the file twice, thereby obtaining two file handles.
> >
> > Well, that's what I thought.
> >
> > I must admit I'm not really comfortable with this interface. IMO it would
> > be better if _open() created the suspend blocker giving it a name based on
> > the name of the process that called it. Something like
> > "<process name>_<timestamp>" might work at first sight.
> >
> > Alternatively, "<process_name><number>", where <number> is 0 for the first
> > suspend blocker created by the given process, 1 for the second one etc., also
> > seems to be doable.
>
> I think it is important to let user-space specify the name. If a
> process uses multiple suspend blockers, it is impossible to tell what
> each one is used for if they are automatically named.

Well, the problem is the only purpose of this is user space debugging, isn't it?

Now, while I don't think it's generally bad to provide kernel interfaces
helping to debug user space, I'm not quite sure if that should be done at the
expense of the clarity of kernel-user space interfaces.

I wonder how many cases there are in which distinguishing between suspend
blockers used by the same user space task is practically relevant.

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-05-03 23:51    [W:0.303 / U:6.340 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site