coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tail: use polling and inotify for mixed remote/local arguments?


From: Jim Meyering
Subject: Re: tail: use polling and inotify for mixed remote/local arguments?
Date: Wed, 04 Jan 2012 09:46:13 +0100

Bernhard Voelker wrote:
> I stumbled over this readme sentence:
>
>> tail -f now uses polling (not inotify) when any of its file arguments
>> resides on a file system of unknown type.
>
> So I asked myself what happens if all file system types of all arguments
> are known but one is "remote"? strace gave the answer: in that case,
> tail uses polling for all arguments although it could use inotify for
> at least some of them.
>
> Is there a technical reason to do so, or is this just because the
> implementation would be more complicated?

The implementation would be more complicated.

However, as I wrote recently regarding distributed file systems,
tail -f may end up doing something smarter to accommodate them.
It could use inotify to handle local modifications, and polling
to catch changes that do not trigger inotify events.

But even that feels like a tough call, unless the hybrid code
can somehow be very clean and simple.  Would be the benefit even
be perceptible?  To how many people?  How often do people run tail -f
on a combination of local and non-local files?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]