[oe] invalidating udev cache, how?

Koen Kooi k.kooi at student.utwente.nl
Thu Dec 4 17:11:58 UTC 2008


On 04-12-08 17:58, Mike (mwester) wrote:
> Koen Kooi wrote:
> ...
>> My current ideas:
>>
>> 1) remove /etc/dev.tar if its>  x weeks old
>> 2) recreate it on shutdown
>> 3) remove it after x times
>>
>> option 1) breaks on systems without an RTC and/or no /etc/timestamp
>> option 2) moves the slowness to shutdown
>> option 3) requires extra logic and filesystem access
>>
>> and all options don't fix the first case I mentioned, they all take a
>> while to make /dev/fb1 appear.
>>
>> The key is that it should be transparent to users, so adding a check for
>> .e.g 'ignore_dev.tar=1' in bootargs wouldn't work, since that implies
>> that users are aware of the problem and know how to 'fix' it.
>>
>> Does anyone have other ways to invalidate the cache, and if not, which
>> option would get your vote?
>
> A slight improvement would be to make the dev.tar file dependent upon
> the bootargs; i.e. invalidate /etc/dev.tar file if the boot command line
> doesn't match the current command line.  This could be a very fast
> operation, just "cmp /proc/cmdline /etc/dev_cmdline" or similar.

That solves only part of the problem, since on omap3 we enable a 
different fb driver that doesn't require any bootargs (and safely 
ignores the ones for the old driver) and gives you an additional overlay 
(/dev/fb2).

But I think combining the 'cmp /proc/cmdline /etc/dev_cmdline' with 
option 2) would solve most of the problems I'm seeing in a not-too-ugly 
way :)

Thanks for the suggestion!

regards,

Koen





More information about the Openembedded-devel mailing list