From: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Dave Chinner <david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org>,
linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-fsdevel
<linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Mingming Cao <mcao-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Subject: Re: stable page writes: wait_on_page_writeback and packet signing
Date: Wed, 9 Mar 2011 20:30:44 -0500 [thread overview]
Message-ID: <20110309203044.4fd0498e@corrin.poochiereds.net> (raw)
In-Reply-To: <AANLkTi=pXHjE6tNMm0_nO=Cn3nGH8oZ6Xhm1STh8x1Xe-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Wed, 9 Mar 2011 18:33:20 -0600
Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Wed, Mar 9, 2011 at 5:54 PM, Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> > On Wed, 9 Mar 2011 16:01:30 -0600
> > Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> >>
> >> Except we don't need to wait that long with the page locked
> >> ie for a response from the cifs server (such as Samba or Windows
> >> or NetApp), just need to wait for it to get on the wire.
> >> Waiting for us to get the server response would
> >> take 10 or 100 times longer. In any case we can't resend
> >> the same request to the server (the signature changes on the
> >> resend since the sequence number is incremented on every
> >> request/response so we have to recalc the checksum anyway) and
> >> cifs requests can't get lost (as with nfs over udp). Keeping
> >> a page locked for 10milliseconds seems like a bad idea - but
> >> it is a little more complicated to implement (for the cifs case)
> >> so that we end page writeback (for the non-WB_SYNC)
> >> as quickly as reasonably possible so we don't kill perf.
> >>
> >
> > The problem here is that the socket layer doesn't have a mechanism
> > to notify us of a TCP ACK. So, we have to wait for the next-best thing
> > -- a response from the server.
>
> But ... we can stop writeback as soon as kernel_sendmsg returns - once
> we return from kernel_sendmsg the buffers can (and often will) be
> freed so we know those pages could not still be used by tcp (below
> cifs) once kernel_sendmsg returns. We can minimize the delay further
> by making sure we set TCP_NODELAY on the socket (we probably ought to
> make that the default instead of an option).
>
That's not correct. A return from kernel_sendmsg just means that the
data has been buffered up, not that it has been sent and acked. We
shouldn't use that as an indicator to mean that the pages no longer
need to be stable.
--
Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
next prev parent reply other threads:[~2011-03-10 1:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-09 19:44 stable page writes: wait_on_page_writeback and packet signing Steve French
[not found] ` <AANLkTinFx9KGKDWSdUvFSvT4S6f9QjBzX=6Uo17oO89+-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-09 21:51 ` Dave Chinner
2011-03-09 21:58 ` Chris Mason
2011-03-09 22:13 ` Steve French
[not found] ` <AANLkTikK8MOm-m9XsOA4YGRe=E9bJTDh4iEYXtZumNmv-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-10 12:26 ` Chris Mason
2011-03-10 13:16 ` Jeff Layton
[not found] ` <20110310081638.0f8275d4-xSBYVWDuneFaJnirhKH9O4GKTjYczspe@public.gmane.org>
2011-03-10 13:32 ` Chris Mason
2011-03-10 13:47 ` Jeff Layton
[not found] ` <20110310084724.658fe5d7-xSBYVWDuneFaJnirhKH9O4GKTjYczspe@public.gmane.org>
2011-03-10 13:58 ` Chris Mason
2011-03-11 12:11 ` Jeff Layton
[not found] ` <20110311071143.01b407b6-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2011-03-11 12:56 ` Chris Mason
2011-03-11 13:42 ` Jeff Layton
[not found] ` <20110311084221.4ac6bd11-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2011-03-11 16:00 ` Chris Mason
2011-03-09 23:46 ` Dave Chinner
2011-03-09 22:01 ` Steve French
2011-03-09 23:54 ` Jeff Layton
[not found] ` <20110309185427.7858c29b-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2011-03-10 0:33 ` Steve French
[not found] ` <AANLkTi=pXHjE6tNMm0_nO=Cn3nGH8oZ6Xhm1STh8x1Xe-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-10 1:30 ` Jeff Layton [this message]
2011-03-10 13:53 ` Steve French
[not found] ` <20110309203044.4fd0498e-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2011-03-11 11:53 ` Jeff Layton
[not found] ` <AANLkTinDmqah6pQnHugoVxh-gDq+6+MDMuh-TyVAQ7LP-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-10 1:41 ` Trond Myklebust
[not found] ` <1299721264.2976.3.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2011-03-10 7:34 ` Christoph Hellwig
2011-03-10 13:44 ` Steve French
2011-03-09 23:45 ` Jeff Layton
2011-03-10 2:12 ` Jeff Layton
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=20110309203044.4fd0498e@corrin.poochiereds.net \
--to=jlayton-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mcao-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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).