lkml.org 
[lkml]   [2012]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [RFC][PATCH 2/2] efi_pstore: Introducing workqueue updating sysfs entries
Date

> I'm not a fan of creating a periodic timer that wakes up here to check for an event that should be considered very rare.
>
> Can this just become scheduled work? Scheduling work itself is a very lightweight process and should be relatively safe to do from a
> pstore write.

I agree that the periodic timer is heavy a bit.
But I would like to keep a write callback simple as much as possible in panic situation.
For example, I'm concerned that efi_pstore hangs up due to some spin_locks related workqueue like gcwq->lock.

Also, a situation which this workqueue is needed is just oops case because, system will be down and users can't access to sysfs files
in other cases, panic, reboot and emergency_restart.

So, Can I call schedule_work in oops case only as follows?

efi_pstore_write()
{
<write log to NVRAM>

if (reason != KMSG_DUMP_OOPS)
return;

schedule_work()

}


\
 
 \ /
  Last update: 2012-08-17 23:21    [W:0.045 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site