#9924 NORM Not Tri: sugar logs opened O_SYNC

Zarro Boogs per Child bugtracker at laptop.org
Wed Dec 23 17:13:15 EST 2009


#9924: sugar logs opened O_SYNC
------------------------------------+---------------------------------------
           Reporter:  Quozl         |       Owner:               
               Type:  defect        |      Status:  new          
           Priority:  normal        |   Milestone:  Not Triaged  
          Component:  not assigned  |     Version:  not specified
         Resolution:                |    Keywords:               
        Next_action:  never set     |    Verified:  0            
Deployment_affected:                |   Blockedby:               
           Blocking:                |  
------------------------------------+---------------------------------------

Comment(by Quozl):

 Replying to [comment:1 dsd]:
 > any chance you could file this directly at SL?

 Sure, I'll look into that.

 Replying to [comment:2 mstone]:
 > The use of O_SYNC is quite intentional; it helps people watching
 activity logs as activities crash and it helps make sure the logs make it
 to disk in case of hard crashes.

 Yes, it helps the logs make it to disk in case of hard crashes, but no, it
 doesn't help people watching activity logs as activities crash.  This is
 because people watching activity logs would do so with tail(1) or cat(1)
 which see the data from the completed write(2) calls, even though it may
 not have been flushed to disk.

 > Thus, while you may be right that it should not be used by default, it
 would still be good to use it if any of the sugar debugging flags are set.

 Agreed, keeping it as an option would be potentially helpful during
 diagnosis of a problem, especially a kernel panic induced by a Sugar
 activity.

 > Also, you expressed unhappiness with the linear cost of the algorithm
 used for selecting the activity name. This algorithm was picked because it
 is simple and race-free. Do you know a faster algorithm with the same
 properties?

 I've an algorithm that adds time_t to the filename, but this decreases the
 usability of the filename for those operating the UNIX shell.  It is less
 simple.  It is race-free.  time.time() is not guaranteed to be monotonic
 increment, but the continued use of a sequence number compensates.

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


More information about the Bugs mailing list