Devkit-devel Archive

List Statistics

  • Total Threads: 93
  • Total Posts: 28

Phrases Used to Find This Thread

  #1  
06-04-2012 10:15 AM
Devkit-devel member admin is online now
User
 

Hi,

I'm doing some development on Linux scsi cdrom driver(sr module)
recently and found that the udisks daemon will periodically open the
ODD block device /dev/sr0. I guess the reason is to check events, since
on block open, the check_events function will be called.

But since the udev will also enable in kernel polling by change the
kernel parameter /sys/module/block/parameters/events_dfl_poll_msecs to 2
seconds, so the polls done by udisks daemon by a open system call for
the scsi cdrom block device should be unnecessary.

Udev did this with a rule file:
/lib/udev/rules.d/60-persistent-storage.rules

And I've tested by doing udisks --inhibit-polling /dev/sr0 and
everything still works fine.

The problems I can think of are:
1 some in kernel drivers didn't set the event value for the disk properly;
2 the udev rule file didn't change the events_dfl_poll_msecs parameter
when needed(for scsi block device, it is OK, but I'm not sure other cases).

So, do you think the poll for such devices could be set to false by
default?

Thanks,
Aaron


_______________________________________________
devkit-devel mailing list
devkit-
http://lists.freedesktop.org/mailman/listinfo/devkit-devel
)

  #2  
06-04-2012 05:07 PM
Devkit-devel member admin is online now
User
 

Hi,

I'm doing some development on Linux scsi cdrom driver(sr module)
recently and found that the udisks daemon will periodically open the
ODD block device /dev/sr0. I guess the reason is to check events, since
on block open, the check_events function will be called.

But since the udev will also enable in kernel polling by change the
kernel parameter /sys/module/block/parameters/events_dfl_poll_msecs to 2
seconds, so the polls done by udisks daemon by a open system call for
the scsi cdrom block device should be unnecessary.

Udev did this with a rule file:
/lib/udev/rules.d/60-persistent-storage.rules

And I've tested by doing udisks --inhibit-polling /dev/sr0 and
everything still works fine.

The problems I can think of are:
1 some in kernel drivers didn't set the event value for the disk properly;
2 the udev rule file didn't change the events_dfl_poll_msecs parameter
when needed(for scsi block device, it is OK, but I'm not sure other cases).

So, do you think the poll for such devices could be set to false by
default?

Thanks,
Aaron


_______________________________________________
devkit-devel mailing list
devkit-
http://lists.freedesktop.org/mailman/listinfo/devkit-devel
)
Hey,

On Fri, Apr 6, 2012 at 5:15 AM, Aaron Lu <> wrote:
> Hi,
>
> I'm doing some development on Linux scsi cdrom driver(sr module)
> recently and found that the udisks daemon will periodically open the
> ODD block device /dev/sr0. I guess the reason is to check events, since
> on block open, the check_events function will be called.
>
> But since the udev will also enable in kernel polling by change the
> kernel parameter /sys/module/block/parameters/events_dfl_poll_msecs to 2
> seconds, so the polls done by udisks daemon by a open system call for
> the scsi cdrom block device should be unnecessary.

Maybe you are just using an old version of udisks? As of udisks 1.0.3
(released mid 2011), we no longer poll if the kernel does, this is the
commit

http://cgit.freedesktop.org/udisks/commit/?h=udisks1&id=2d0272eb3be71f6ee3f52c55a3d608764b675fb0

For udisks2, we never poll, we assume the kernel is always polling.

Thanks,
David
_______________________________________________
devkit-devel mailing list
devkit-
http://lists.freedesktop.org/mailman/listinfo/devkit-devel
)

  #3  
09-04-2012 11:58 AM
Devkit-devel member admin is online now
User
 

Hi,

I'm doing some development on Linux scsi cdrom driver(sr module)
recently and found that the udisks daemon will periodically open the
ODD block device /dev/sr0. I guess the reason is to check events, since
on block open, the check_events function will be called.

But since the udev will also enable in kernel polling by change the
kernel parameter /sys/module/block/parameters/events_dfl_poll_msecs to 2
seconds, so the polls done by udisks daemon by a open system call for
the scsi cdrom block device should be unnecessary.

Udev did this with a rule file:
/lib/udev/rules.d/60-persistent-storage.rules

And I've tested by doing udisks --inhibit-polling /dev/sr0 and
everything still works fine.

The problems I can think of are:
1 some in kernel drivers didn't set the event value for the disk properly;
2 the udev rule file didn't change the events_dfl_poll_msecs parameter
when needed(for scsi block device, it is OK, but I'm not sure other cases).

So, do you think the poll for such devices could be set to false by
default?

Thanks,
Aaron


_______________________________________________
devkit-devel mailing list
devkit-
http://lists.freedesktop.org/mailman/listinfo/devkit-devel
)
Hey,

On Fri, Apr 6, 2012 at 5:15 AM, Aaron Lu <> wrote:
> Hi,
>
> I'm doing some development on Linux scsi cdrom driver(sr module)
> recently and found that the udisks daemon will periodically open the
> ODD block device /dev/sr0. I guess the reason is to check events, since
> on block open, the check_events function will be called.
>
> But since the udev will also enable in kernel polling by change the
> kernel parameter /sys/module/block/parameters/events_dfl_poll_msecs to 2
> seconds, so the polls done by udisks daemon by a open system call for
> the scsi cdrom block device should be unnecessary.

Maybe you are just using an old version of udisks? As of udisks 1.0.3
(released mid 2011), we no longer poll if the kernel does, this is the
commit

http://cgit.freedesktop.org/udisks/commit/?h=udisks1&id=2d0272eb3be71f6ee3f52c55a3d608764b675fb0

For udisks2, we never poll, we assume the kernel is always polling.

Thanks,
David
_______________________________________________
devkit-devel mailing list
devkit-
http://lists.freedesktop.org/mailman/listinfo/devkit-devel
)
Hi,

On Fri, Apr 06, 2012 at 12:07:06PM -0400, David Zeuthen wrote:
> Hey,
>
> On Fri, Apr 6, 2012 at 5:15 AM, Aaron Lu <> wrote:
> > Hi,
> >
> > I'm doing some development on Linux scsi cdrom driver(sr module)
> > recently and found that the udisks daemon will periodically open the
> > ODD block device /dev/sr0. I guess the reason is to check events, since
> > on block open, the check_events function will be called.
> >
> > But since the udev will also enable in kernel polling by change the
> > kernel parameter /sys/module/block/parameters/events_dfl_poll_msecs to 2
> > seconds, so the polls done by udisks daemon by a open system call for
> > the scsi cdrom block device should be unnecessary.
>
> Maybe you are just using an old version of udisks? As of udisks 1.0.3
> (released mid 2011), we no longer poll if the kernel does, this is the
> commit
>
> http://cgit.freedesktop.org/udisks/commit/?h=udisks1&id=2d0272eb3be71f6ee3f52c55a3d608764b675fb0
>
> For udisks2, we never poll, we assume the kernel is always polling.
>

Thanks for the information.

I just test again, and didn't see any more udisks polls...
I have no idea what happened the last time, I indeed see a lot of opens
from udisks. I'm using udisks-1.0.4-3.fc16.x86_64.

Anyway, from your description, this is already fixed and if it ever
happens again to me, it should be a bug :-)

Thanks,
Aaron

_______________________________________________
devkit-devel mailing list
devkit-
http://lists.freedesktop.org/mailman/listinfo/devkit-devel
)





NewsArc Lists  |  Culture Pages   |  Computing Archive  |  Media-Pages
Link to this page on your blog or website by copying the HTML code below and pasting it into your site: