#7981 NORM 8.2.0 (: EC mask setting is inefficient

Zarro Boogs per Child bugtracker at laptop.org
Thu Sep 4 15:25:54 EDT 2008


#7981: EC mask setting is inefficient
-------------------------+--------------------------------------------------
   Reporter:  cjb        |       Owner:  dsaxena               
       Type:  defect     |      Status:  assigned              
   Priority:  normal     |   Milestone:  8.2.0 (was Update.2)  
  Component:  kernel     |     Version:  not specified         
 Resolution:             |    Keywords:  polish:8.2.0 cjbfor8.2
Next_action:  never set  |    Verified:  0                     
  Blockedby:             |    Blocking:                        
-------------------------+--------------------------------------------------
Changes (by dsaxena):

  * status:  new => assigned


Comment:

 Replying to [comment:3 cjb]:
 > Replying to [comment:1 dsaxena]:
 > > This might be due to OHM disabling events via the
 /sys/power/wakeup_events
 > > interface, where we write one file per bit and on every write I do a
 RMW
 > > on the EC mask. I should do some sort of caching in the kernel and
 only write
 > > back the bits when we trigger a suspend.
 >
 > This won't quite work, because I want to turn off the BAT SOC events
 before going into idle suspend, and I want to re-enable them on resume.
 Perhaps instead have the sysfs files modify the kernel's internal idea of
 the mask, and then "echo 1 > commit" to commit them to the EC?  (Or
 something similar.)

 Hmm...that does add a complication. I don't really like the idea of a
 separate "commit" operation as sysfs ops are meant to be atomically
 completed and this seems to go counter to that. We may just have to go
 back to the original idea of one single file that takes the whole bitmask.
 Let me mull this over a bit...

-- 
Ticket URL: <http://dev.laptop.org/ticket/7981#comment:6>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list