* splice read byte accounting @ 2010-01-27 22:22 Chuck Lever 2010-01-27 23:19 ` Trond Myklebust 0 siblings, 1 reply; 6+ messages in thread From: Chuck Lever @ 2010-01-27 22:22 UTC (permalink / raw) To: Trond Myklebust; +Cc: Linux NFS Mailing List Hi- nfs_file_splice_write() accounts for the bytes in the request in the "normal bytes written" counter, but nfs_file_splice_read() does not account for bytes read. Should the read path count these as normal bytes as well, or should the write path not account for these bytes? -- Chuck Lever chuck[dot]lever[at]oracle[dot]com ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: splice read byte accounting 2010-01-27 22:22 splice read byte accounting Chuck Lever @ 2010-01-27 23:19 ` Trond Myklebust 2010-01-28 15:07 ` Chuck Lever 0 siblings, 1 reply; 6+ messages in thread From: Trond Myklebust @ 2010-01-27 23:19 UTC (permalink / raw) To: Chuck Lever; +Cc: Linux NFS Mailing List On Wed, 2010-01-27 at 17:22 -0500, Chuck Lever wrote: > Hi- > > nfs_file_splice_write() accounts for the bytes in the request in the > "normal bytes written" counter, but nfs_file_splice_read() does not > account for bytes read. > > Should the read path count these as normal bytes as well, or should > the write path not account for these bytes? > nfs_file_splice_read() should probably update NFSIOS_NORMALREADBYTES. That said, why do nfs_file_read(), nfs_file_write() and nfs_file_splice_write() update the stats with the requested number of bytes, irrespective of the number of bytes that were actually read/write? Trond ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: splice read byte accounting 2010-01-27 23:19 ` Trond Myklebust @ 2010-01-28 15:07 ` Chuck Lever 2010-01-28 15:15 ` Trond Myklebust 2010-01-28 15:16 ` Suresh Jayaraman 0 siblings, 2 replies; 6+ messages in thread From: Chuck Lever @ 2010-01-28 15:07 UTC (permalink / raw) To: Trond Myklebust; +Cc: Linux NFS Mailing List On Jan 27, 2010, at 6:19 PM, Trond Myklebust wrote: > On Wed, 2010-01-27 at 17:22 -0500, Chuck Lever wrote: >> Hi- >> >> nfs_file_splice_write() accounts for the bytes in the request in the >> "normal bytes written" counter, but nfs_file_splice_read() does not >> account for bytes read. >> >> Should the read path count these as normal bytes as well, or should >> the write path not account for these bytes? >> > > nfs_file_splice_read() should probably update NFSIOS_NORMALREADBYTES. > > That said, why do nfs_file_read(), nfs_file_write() and > nfs_file_splice_write() update the stats with the requested number of > bytes, irrespective of the number of bytes that were actually > read/write? We're counting the number of bytes requested by applications. I'm not sure which is more useful here; number of bytes requested, or number of bytes actually read/written. For computing ratios of app bytes v. otw bytes, I suppose the latter? -- Chuck Lever chuck[dot]lever[at]oracle[dot]com ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: splice read byte accounting 2010-01-28 15:07 ` Chuck Lever @ 2010-01-28 15:15 ` Trond Myklebust 2010-01-28 16:07 ` Chuck Lever 2010-01-28 15:16 ` Suresh Jayaraman 1 sibling, 1 reply; 6+ messages in thread From: Trond Myklebust @ 2010-01-28 15:15 UTC (permalink / raw) To: Chuck Lever; +Cc: Linux NFS Mailing List On Thu, 2010-01-28 at 10:07 -0500, Chuck Lever wrote: > On Jan 27, 2010, at 6:19 PM, Trond Myklebust wrote: > > On Wed, 2010-01-27 at 17:22 -0500, Chuck Lever wrote: > >> Hi- > >> > >> nfs_file_splice_write() accounts for the bytes in the request in the > >> "normal bytes written" counter, but nfs_file_splice_read() does not > >> account for bytes read. > >> > >> Should the read path count these as normal bytes as well, or should > >> the write path not account for these bytes? > >> > > > > nfs_file_splice_read() should probably update NFSIOS_NORMALREADBYTES. > > > > That said, why do nfs_file_read(), nfs_file_write() and > > nfs_file_splice_write() update the stats with the requested number of > > bytes, irrespective of the number of bytes that were actually > > read/write? > > We're counting the number of bytes requested by applications. I'm not > sure which is more useful here; number of bytes requested, or number > of bytes actually read/written. For computing ratios of app bytes v. > otw bytes, I suppose the latter? > Yes. Most apps will just be inputting the buffer size as the 'number of bytes requested', which is not really a particularly useful number. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: splice read byte accounting 2010-01-28 15:15 ` Trond Myklebust @ 2010-01-28 16:07 ` Chuck Lever 0 siblings, 0 replies; 6+ messages in thread From: Chuck Lever @ 2010-01-28 16:07 UTC (permalink / raw) To: Trond Myklebust; +Cc: Linux NFS Mailing List On Jan 28, 2010, at 10:15 AM, Trond Myklebust wrote: > On Thu, 2010-01-28 at 10:07 -0500, Chuck Lever wrote: >> On Jan 27, 2010, at 6:19 PM, Trond Myklebust wrote: >>> On Wed, 2010-01-27 at 17:22 -0500, Chuck Lever wrote: >>>> Hi- >>>> >>>> nfs_file_splice_write() accounts for the bytes in the request in >>>> the >>>> "normal bytes written" counter, but nfs_file_splice_read() does not >>>> account for bytes read. >>>> >>>> Should the read path count these as normal bytes as well, or should >>>> the write path not account for these bytes? >>>> >>> >>> nfs_file_splice_read() should probably update >>> NFSIOS_NORMALREADBYTES. >>> >>> That said, why do nfs_file_read(), nfs_file_write() and >>> nfs_file_splice_write() update the stats with the requested number >>> of >>> bytes, irrespective of the number of bytes that were actually >>> read/write? >> >> We're counting the number of bytes requested by applications. I'm >> not >> sure which is more useful here; number of bytes requested, or number >> of bytes actually read/written. For computing ratios of app bytes v. >> otw bytes, I suppose the latter? >> > > Yes. Most apps will just be inputting the buffer size as the 'number > of > bytes requested', which is not really a particularly useful number. I've got another patch in this area (which motivated the original question). I'll code something up and send it your way. -- Chuck Lever chuck[dot]lever[at]oracle[dot]com ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: splice read byte accounting 2010-01-28 15:07 ` Chuck Lever 2010-01-28 15:15 ` Trond Myklebust @ 2010-01-28 15:16 ` Suresh Jayaraman 1 sibling, 0 replies; 6+ messages in thread From: Suresh Jayaraman @ 2010-01-28 15:16 UTC (permalink / raw) To: Chuck Lever; +Cc: Trond Myklebust, Linux NFS Mailing List On 01/28/2010 08:37 PM, Chuck Lever wrote: > On Jan 27, 2010, at 6:19 PM, Trond Myklebust wrote: >> On Wed, 2010-01-27 at 17:22 -0500, Chuck Lever wrote: >>> Hi- >>> >>> nfs_file_splice_write() accounts for the bytes in the request in the >>> "normal bytes written" counter, but nfs_file_splice_read() does not >>> account for bytes read. >>> >>> Should the read path count these as normal bytes as well, or should >>> the write path not account for these bytes? >>> >> >> nfs_file_splice_read() should probably update NFSIOS_NORMALREADBYTES. Yes, I think. Looks like a oversight while we added splice write support. The argument then was the number of bytes written via splice are effectively cached writes and hence makes sense to add it to NFSIO_NORMALWRITTENBYTES. >> That said, why do nfs_file_read(), nfs_file_write() and >> nfs_file_splice_write() update the stats with the requested number of >> bytes, irrespective of the number of bytes that were actually >> read/write? > > We're counting the number of bytes requested by applications. I'm not > sure which is more useful here; number of bytes requested, or number of > bytes actually read/written. For computing ratios of app bytes v. otw > bytes, I suppose the latter? > I think the number of bytes actually read/written would be more useful. Thanks, -- Suresh Jayaraman ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-28 16:07 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-01-27 22:22 splice read byte accounting Chuck Lever 2010-01-27 23:19 ` Trond Myklebust 2010-01-28 15:07 ` Chuck Lever 2010-01-28 15:15 ` Trond Myklebust 2010-01-28 16:07 ` Chuck Lever 2010-01-28 15:16 ` Suresh Jayaraman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox