linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com>
To: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Latchesar Ionkov <lucho@ionkov.net>,
	linux-fsdevel@vger.kernel.org,
	Badari Pulavarty <pbadari@us.ibm.com>,
	v9fs-developer@lists.sourceforge.net
Subject: Re: [V9fs-developer] [PATCH 1/5] [net/9p] Add capability() to p9_trans_module
Date: Wed, 18 Aug 2010 09:56:37 -0700	[thread overview]
Message-ID: <4C6C10C5.9030504@linux.vnet.ibm.com> (raw)
In-Reply-To: <AANLkTikmqM-Y1QqdE7-jF+ek7vn42VpZUDQ-KMMzvbNL@mail.gmail.com>

Eric Van Hensbergen wrote:
> On Tue, Aug 17, 2010 at 6:31 PM, Venkateswararao Jujjuri (JV)
> <jvrao@linux.vnet.ibm.com> wrote:
>>>> Additionally, given we know the page size constant, couldn't we infer
>>>> this from a negotiated msize?  Transports already have an maxsize
>>>> field which limits the msize selections (and defaults? if not maybe it
>>>> should?) -- why not just use that?
>> The IO size in this mode is derived by virtio ring size rather than the msize.
>> msize is restricted to the maximum amount of data that gets copied on the the
>> kmalloc'd buffer.
>> In this case it is just the header.
>>
> 
> Actually, msize is supposed to be the maximum amount of data that gets
> copied over the transport which should be a factor determined by the
> client and server and the underlying technology which links them.
> From that aspect I think its a perfectly valid way to set this up and
> is already part of the mechanisms.
Our intention of this patch was to achieve zero copy for reads/writes with
minimal changes, not affecting other transports and other vfs transactions.

In this method, if the transport has capability to send user pages directly, we
are using/treating
the msize as the maximum allowed size for header, and the actual payload is
limited/controlled
by the virtio ring size.  With these minor set of changes, we achieved the zero
copy on the most
important code path, read/write...without any changes to other sections of the code.

This could be a step in the right direction, in the future when we are ready to
modify
other code paths like readdir, xattr we can take more broader set of changes.
Currently we are using 8k as the msize...kmalloc() on anything beyond 1 page(4k)
may fail
under high load.. so we may have to revisit our entire logic somewhere down the line
on how do we segregate header from the actual payload.


> 
>> I think moving the #of pages that can be accommodated onto the virtio ring to
>> the p9_client,
>> we can use it along with the page_size to determine how much data we are passing.
>> With this we can tune our calculations on the read/write side .. so that we can
>> derive better
>> logic to handle short reads.
>>
> 
> I don't know if I saw such a use in the existing patch.  Can you give
> me a concrete use case where we would use multiple "short" pages
> instead of mostly full pages and potentially a single short page at
> the end?

I am talking about short reads/writes not short pages.
Yes at the most you will have two partial pages. (un-aligned start, and may be
last page)

The case where the request into VFS is more than the actual read/write we could do
either because of transport restriction/msize .. or something else.

Say, if the read size of 512k comes into vfs, and we could put only 480k into one
request because of virtio ring limitation (128-8(header) * 4k). At VFS/client level
we need to retry the read for the rest of the IO..before we return back to the user.

And this change is not in the patch yet.. I am proposing to have it in in my
next version.

> 
>            -eric



  reply	other threads:[~2010-08-18 16:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-17 17:27 [00/05] Add zero copy capability to virtio transport Venkateswararao Jujjuri (JV)
2010-08-17 17:27 ` [PATCH 1/5] [net/9p] Add capability() to p9_trans_module Venkateswararao Jujjuri (JV)
2010-08-17 20:43   ` [V9fs-developer] " Eric Van Hensbergen
2010-08-17 20:46     ` Latchesar Ionkov
2010-08-17 23:31       ` Venkateswararao Jujjuri (JV)
2010-08-18 15:16         ` Eric Van Hensbergen
2010-08-18 16:56           ` Venkateswararao Jujjuri (JV) [this message]
2010-08-18 18:26             ` Eric Van Hensbergen
2010-08-17 17:27 ` [PATCH 2/5] [net/9p] Pass p9_client structure to pdu perpartion routines Venkateswararao Jujjuri (JV)
2010-08-17 17:27 ` [PATCH 3/5] [net/9p] Add support for placing page addresses directly on the sg list Venkateswararao Jujjuri (JV)
2010-08-18 20:50   ` [V9fs-developer] " Latchesar Ionkov
2010-08-19 18:28     ` Venkateswararao Jujjuri (JV)
2010-08-19 18:49       ` Latchesar Ionkov
2010-08-19 20:47         ` Venkateswararao Jujjuri (JV)
2010-08-19 21:07           ` Latchesar Ionkov
2010-08-19 21:26             ` Eric Van Hensbergen
2010-08-19 23:35               ` Venkateswararao Jujjuri (JV)
2010-08-20  0:27                 ` Eric Van Hensbergen
2010-08-17 17:27 ` [PATCH 4/5] [net/9p] Achieve zero copy on write path Venkateswararao Jujjuri (JV)
2010-08-19 19:30   ` [V9fs-developer] " Latchesar Ionkov
2010-08-19 20:55     ` Venkateswararao Jujjuri (JV)
2010-08-17 17:27 ` [PATCH 5/5] [net/9p] Achieve zero copy on read path Venkateswararao Jujjuri (JV)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C6C10C5.9030504@linux.vnet.ibm.com \
    --to=jvrao@linux.vnet.ibm.com \
    --cc=ericvh@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lucho@ionkov.net \
    --cc=pbadari@us.ibm.com \
    --cc=v9fs-developer@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).