lkml.org 
[lkml]   [2005]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] sched: Fix adverse effects of NFS client on interactive response
Date
On Dec 21, 2005, at 11:10, Horst von Brand wrote:
> Kyle Moffett <mrmacman_g4@mac.com> wrote:
>> On Dec 21, 2005, at 08:21, Trond Myklebust wrote:
>>> ...and if you stick in a faster server?...
>>> There is _NO_ fundamental difference between NFS and a local
>>> filesystem that warrants marking one as "interactive" and the
>>> other as "noninteractive". What you are basically saying is that
>>> all I/O should be marked as TASK_NONINTERACTIVE.
>>
>> Uhh, what part of disk/NFS/filesystem access is "interactive"?
>> Which of those sleeps directly involve responding to user-
>> interface events?
>
> And if it is a user waiting for the data to display? Can't
> distinguish that so easily from the compiler waiting for something
> to do...

No, but in that case the program probably _already_ has some
interactivity bonus just from user interaction. On the other hand,
UI programming guidelines say that any task which might take more
than a half-second or so should not be run in the event loop, but in
a separate thread (either a drawing thread or similar). In that
case, your event loop thread is the one with the interactivity bonus,
and the others are just data processing threads (like the compile you
have running in the background or the webserver responding to HTTP
requests), that the user would need to manually arbitrate between
with nice levels.

The whole point of the interactivity bonus was that processes that
follow the cycle <waiting-for-input> => <respond-to-input-for-less-
than-time-quantum> => <waiting-for-input> would get a boost; things
like dragging a window or handling mouse or keyboard events should
happen within a small number of milliseconds, whereas background
tasks really _don't_ care if they are delayed running their time
quantum by 400ms, as long as they get their full quantum during each
cycle.

Cheers,
Kyle Moffett

--
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
-- Brian Kernighan


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-12-21 21:39    [W:0.084 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site