[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tail: use polling and inotify for mixed remote/local arguments?
From: |
Bernhard Voelker |
Subject: |
Re: tail: use polling and inotify for mixed remote/local arguments? |
Date: |
Wed, 04 Jan 2012 10:00:28 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0 |
On 01/04/2012 09:46 AM, Jim Meyering wrote:
> 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.
Thanks for the clarification.
> 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?
I agree.
Have a nice day,
Berny