Jim Meyering wrote:
> Pádraig Brady <[EMAIL PROTECTED]> wrote:
>> I was thinking it would be useful to
>> add an option to dd to tell it to
>> instruct the OS not to cache the data.
> 
> I like the idea, even if it works only with very recent Linux
> kernels.

It's not that new. It's in since 2.5.60 according
to the man page, and I verified the code is in 2.6.0
Also it uses a posix interface, so I presume this is
available elsewhere.

> 
>> Personally I use dd to move large files like disc images etc.
>> around, and I know I will not need the file cached.
>>
>> A very quick example patch which has only
>> been tested on linux is attached.
>>
>> Do you think this is required?
>> Do you think this is the right interface?
> 
> There are two separate sets of data to which we
> might want to apply such an optimization: input and output.
> 
> So how about an interface that lets the user disable caching on
> either or both?  E.g., no-i-cache no-o-cache.
> I find the "-"-less options far less readable.
> Actually, I prefer the even longer names:
>   input-cache-disable
>   output-cache-disable
> 
> nocache could still be an alias for the combination.

I considered this, but thought you wouldn't need this granularity.
But thinking more about it I think you're right.

If we want to control input and output separately
perhaps we should use flags. So we have:
iflag=nocache and oflag=nocache

The usual case where we want to do the same on both
could be handled with flag=nocache
One can't specify both [io]flag=FLAGS with flag=FLAGS
at present, but I think that should be supported anyway.

thanks,
Pádraig.


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to