public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RFC: one solution to sys_sync livelock fix
@ 2002-02-13 22:37 Bill Davidsen
  2002-02-15 18:19 ` Stephen C. Tweedie
  0 siblings, 1 reply; 3+ messages in thread
From: Bill Davidsen @ 2002-02-13 22:37 UTC (permalink / raw)
  To: Linux Kernel Mailing List

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
  process

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 <davidsen@tmr.com>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-02-17 12:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-13 22:37 RFC: one solution to sys_sync livelock fix Bill Davidsen
2002-02-15 18:19 ` Stephen C. Tweedie
2002-02-17 12:36   ` Bill Davidsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox