bug-coreutils
[Top][All Lists]
Advanced

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

bug#7362: dd strangeness


From: Paul Eggert
Subject: bug#7362: dd strangeness
Date: Wed, 02 Mar 2011 16:11:15 -0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7

On 03/02/2011 03:29 PM, Pádraig Brady wrote:
The O_DIRECT ->  normal switch done in iwrite() for the
last write, should only happen once.
If it happens more than that, we can print a warning,
suggesting the use of iflag=fullblock.

Yes, that sounds like a better approach.
Thanks for thinking this through.

I looked into O_CIO and it appears that it does
imply O_DIRECT, but O_DIRECT does not have the
problems on AIX (which has O_CIO) that I guess it
has on GNU/Linux.  Quoting from
<http://www-03.ibm.com/systems/resources/systems_p_os_aix_whitepapers_db_perf_aix.pdf>
The use of Direct I/O requires that certain
  alignment and length restrictions be met by the
  application’s I/O requests. Table 1 lists these
  requirements for JFS2. Failure to meet these
  requirements causes reads and writes to be done
  using normal cached I/O, but after the data is
  transferred to the application buffer, the cached
  copy is discarded.

which suggests that iwrite's fcntl in iwrite is
not needed on AIX.  I don't know if this is worth
optimizing, but perhaps it's worth a comment as
to why we worry about O_DIRECT but not O_CIO in
iwrite.





reply via email to

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