[lkml]   [2002]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRFC: one solution to sys_sync livelock fix
We haven't discussed what current sync does on a busy system. The process
gets half way through a system call and hangs. What happens when more
processes do that, say at the end of every client run? Will the kernel get
clogged with dozens of threads or process queues? Will processes in the
middle of a system call be swapable?

Proposed solution:

What would happen if the sync(2) call from a non-root user were treated as
if it were an fsync(2) call on every file open for write?
- it would protect the data from that process
- it would NOT burden the system with updating data for every other

For root I think the behaviour should be to write all existing dirty
buffers as a single pass, which eliminates the possible hang.

I think the shutdown issue is hypothetical, shutdown supposedly killed all
other processes which could be writing, one pass would do as well as wait
forever, and if a kill -9 doesn't stop the process doing the writing,
nothing will. The problem is not so much shutdown hanging as root doing
something as simple as 'df' and hanging for a very long time, on a busy
mail server I would bet money on days between occurences of no dirty
buffers. I could find no other UNIX variant which does hang on sync in
actual fact.

bill davidsen <>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:24    [W:0.050 / U:7.736 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site