From: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>,
linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 01/11] CIFS: Respect negotiated MaxMpxCount
Date: Mon, 19 Mar 2012 15:39:05 -0400 [thread overview]
Message-ID: <20120319153905.5fe67738@redhat.com> (raw)
In-Reply-To: <CAH2r5mvhTYPxvDRFCpQ0ULmDn2TNQ80ODbnvTmgFurptYukR1Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Mon, 19 Mar 2012 14:32:17 -0500
Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Mon, Mar 19, 2012 at 2:04 PM, Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org> wrote:
> > 19 марта 2012 г. 19:04 пользователь Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> написал:
> >> On Sun, 18 Mar 2012 22:23:47 +0400
> >> Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org> wrote:
> >>
> >>> 18 марта 2012 г. 14:50 пользователь Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> написал:
> >>> > On Sat, 17 Mar 2012 10:20:59 -0500
> >>> > Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >>> >
> >>> >> On Sat, Mar 17, 2012 at 9:53 AM, Pavel Shilovsky <piastry@etersoft.ru> wrote:
> >>> >> > 17 марта 2012 г. 15:12 пользователь Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> написал:
> >>> >> >> On Fri, 16 Mar 2012 18:09:24 +0300
> >>> >> >> Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org> wrote:
> >>> >> >>
> >>> >> >>> Some servers sets this value less than 50 that was hardcoded and
> >>> >> >>> we lost the connection if when we exceed this limit. Fix this by
> >>> >> >>> respecting this value - not sending more than the server allows.
> >>> >> >>>
> >>> >> >>> Signed-off-by: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
> >>> >> >>> ---
> >>> >> >>> fs/cifs/cifsfs.c | 8 ++++----
> >>> >> >>> fs/cifs/cifsglob.h | 10 +++-------
> >>> >> >>> fs/cifs/cifssmb.c | 9 +++++++--
> >>> >> >>> fs/cifs/connect.c | 11 ++++-------
> >>> >> >>> fs/cifs/dir.c | 6 ++++--
> >>> >> >>> fs/cifs/file.c | 4 ++--
> >>> >> >>> fs/cifs/transport.c | 4 ++--
> >>> >> >>
> >>> >> >> Introducing a behavior change like this at the beginning of the series
> >>> >> >> is probably a mistake. You'll have no reasonable way to bisect down
> >>> >> >> regressions, so you won't know if a problem is due to the change to a
> >>> >> >> credit-based model or due to changing the client to respect the maxmpx.
> >>> >> >>
> >>> >> >> Instead of doing this, we should instead reorganize the code around a
> >>> >> >> credit based model first, while attempting to mimic the existing
> >>> >> >> behavior as closely as possible. Once that framework is in place, then
> >>> >> >> change the behavior and start respecting the maxmpx.
> >>> >> >>
> >>> >> >> If you do that, then someone can reasonably bisect between those two
> >>> >> >> changes and we can determine the source of a regression.
> >>> >> >> --
> >>> >> >> Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> >>> >> >
> >>> >> > This was done to push this patch to 3.3 and stable tree as well.
> >>> >> > That's why it is in the start of series.
> >>> >> >
> >>> >> > If we decide not to push it for now, I agree that this patch should be
> >>> >> > in the modified version (according to changes from other patches) at
> >>> >> > the end of the series.
> >>> >> >
> >>> >> > Steve, your thoughts?
> >>> >> >
> >>> >> > --
> >>> >> > Best regards,
> >>> >> > Pavel Shilovsky.
> >>> >>
> >>> >> We want to fix the reported (cifs) problem first with a simple patch
> >>> >> (that would be suitable for stable too).
> >>> >>
> >>> >> The most important reported problems are mounts to servers
> >>> >> running some versions of Windows Vista and some versions of Windows 7
> >>> >> which set maxmpx below 50 and more importantly have maxworkitems
> >>> >> (in the windows registry on the server) set at too small a value to handle
> >>> >> the 20 or 30 async reads or writes which are now often in flight to them.
> >>> >>
> >>> >> The fix we need first is to honor the maxmpx that the server sets (and
> >>> >> probably remove cifs_max_pending which is obsolete as
> >>> >> a global module parm or simply do the minimum of cifs_max_pending
> >>> >> and maxmpx as the earlier patch did).
> >>> >> If desired (to workaround buggy
> >>> >> servers) in a second patch we could add a mount parm if we think there are
> >>> >> servers such as windows 7 for which we will need to set the
> >>> >> negotiated value lower (due to their maxworkitems registry
> >>> >> problem), or Samba for which maxmpx could be ignored
> >>> >> (and as JRA and others indicated - we could send
> >>> >> a thousand requests in parallel).
> >>> >>
> >>> >
> >>> > By the way...
> >>> >
> >>> > What's the plan for blocking locks and echoes here? Do you plan to make
> >>> > them just ignore the maxmpx limit?
> >>>
> >>> I think we shouldn't play with them for stable. We still don't know
> >>> what exactly we should do with them - really risky to make experiments
> >>> on stable kernels.
> >>>
> >>
> >> Then I'm confused, since you said this in your earlier email:
> >>
> >>> This was done to push this patch to 3.3 and stable tree as well.
> >>> That's why it is in the start of series.
> >>>
> >>
> >> If you're not worrying about stable (and I agree that it's premature to
> >> do that here), then you should focus on converting everything to use
> >> the new credit-based scheme first and only then introduce the behavior
> >> change of respecting maxmpx.
> >>
> >>> So, as we are sure that exceeding negotiated maxmpx value with any
> >>> request except blocking lock and echo is wrong, I suggest to fix this
> >>> - it is what this patch (#1) does. When we get more information about
> >>> blocking locks and echos we can fix this too.
> >>>
> >>
> >> Well, according to what MS wrote back to Steve when he asked, exceeding
> >> the maxmpx is wrong _period_, regardless of the call. Echoes are fairly
> >> easy to deal with, but blocking locks are another matter entirely. I
> >> believe we need a fundamental rethink there.
> >
> > I meant that playing with things like blocking locks and echos is too
> > risky for stable. But if we can fix the existing stable problem (not
> > respecting MaxMpxCount value by other commands) with a strait-forward
> > patch like this - we should do it.
>
> yes. agreed
>
>
Fair enough. Given that the existing code just ignores this, that's
probably a reasonable first step.
One question though -- has anyone actually done any testing against
servers with a maxmpx of 1 with this patch? It would be good to have
some idea of how this behaves in the pessimal case...
--
Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
next prev parent reply other threads:[~2012-03-19 19:39 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 15:09 [PATCH v2 00/11] Prepare transport code for future SMB2 usage Pavel Shilovsky
[not found] ` <1331910574-998-1-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
2012-03-16 15:09 ` [PATCH v2 01/11] CIFS: Respect negotiated MaxMpxCount Pavel Shilovsky
[not found] ` <1331910574-998-2-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
2012-03-17 11:12 ` Jeff Layton
[not found] ` <20120317071201.7f28683b-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2012-03-17 14:53 ` Pavel Shilovsky
[not found] ` <CAKywueTDsGhcHiGM_uX6V0dnY3m_W4kD2qcb+JWRq=UVnBnvPw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-17 15:20 ` Steve French
[not found] ` <CAH2r5msMKiEyS2-ak2+tQoRFommSHRcCNwp-J+XtgovmSae7-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-18 10:33 ` Jeff Layton
2012-03-18 10:50 ` Jeff Layton
[not found] ` <20120318065059.62592afb-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2012-03-18 18:23 ` Pavel Shilovsky
[not found] ` <CAKywueSrGVvwqHbTK3sNLsHDx3vR6U0Ca712ZXKNTnjnOgPGDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-19 15:04 ` Jeff Layton
[not found] ` <20120319110437.635ea546-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2012-03-19 19:04 ` Pavel Shilovsky
[not found] ` <CAKywueR2mWNKxNDhhj_0i0TfiPz3nmvVBXbxGMZ+Lrbgts3cDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-19 19:32 ` Steve French
[not found] ` <CAH2r5mvhTYPxvDRFCpQ0ULmDn2TNQ80ODbnvTmgFurptYukR1Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-19 19:39 ` Jeff Layton [this message]
2012-03-16 15:09 ` [PATCH v2 02/11] CIFS: Simplify inFlight logic Pavel Shilovsky
[not found] ` <1331910574-998-3-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
2012-03-17 11:07 ` Jeff Layton
2012-03-16 15:09 ` [PATCH v2 03/11] CIFS: Introduce credit-based flow control Pavel Shilovsky
[not found] ` <1331910574-998-4-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
2012-03-17 10:32 ` Jeff Layton
[not found] ` <20120317063258.77618c0e-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2012-03-17 14:56 ` Pavel Shilovsky
2012-03-16 15:09 ` [PATCH v2 04/11] CIFS: Make wait_for_free_request killable Pavel Shilovsky
[not found] ` <1331910574-998-5-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
2012-03-17 11:13 ` Jeff Layton
2012-03-16 15:09 ` [PATCH v2 05/11] CIFS: Prepare credits code for a slot reservation Pavel Shilovsky
[not found] ` <1331910574-998-6-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
2012-03-19 19:27 ` Jeff Layton
[not found] ` <20120319152702.3eee1608-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-03-20 7:03 ` Pavel Shilovsky
2012-03-16 15:09 ` [PATCH v2 06/11] CIFS: Delete echo_retries module parm Pavel Shilovsky
[not found] ` <1331910574-998-7-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
2012-03-18 10:30 ` Jeff Layton
2012-03-16 15:09 ` [PATCH v2 07/11] CIFS: Separate protocol-specific code from transport routines Pavel Shilovsky
[not found] ` <1331910574-998-8-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
2012-03-19 19:31 ` Jeff Layton
2012-03-16 15:09 ` [PATCH v2 08/11] CIFS: Separate protocol-specific code from demultiplex code Pavel Shilovsky
[not found] ` <1331910574-998-9-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
2012-03-19 19:41 ` Jeff Layton
[not found] ` <20120319154150.03713caf-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-03-20 7:29 ` Pavel Shilovsky
[not found] ` <CAKywueTxicF658ys1yBzC_95qw0v8R+6pxuhZ_zc+aRKyRLFdw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-20 10:22 ` Jeff Layton
2012-03-16 15:09 ` [PATCH v2 09/11] CIFS: Separate protocol-specific code from cifs_readv_receive code Pavel Shilovsky
[not found] ` <1331910574-998-10-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
2012-03-19 20:17 ` Jeff Layton
[not found] ` <20120319161728.1f8cec40-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-03-20 7:33 ` Pavel Shilovsky
[not found] ` <CAKywueSvsb+BP7ktb0QEgL3WmrO8j42bicvd-WjWNro6qGRc7w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-20 10:24 ` Jeff Layton
[not found] ` <20120320062414.554a033c-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2012-03-20 10:54 ` Pavel Shilovsky
2012-03-16 15:09 ` [PATCH v2 10/11] CIFS: Expand CurrentMid field Pavel Shilovsky
[not found] ` <1331910574-998-11-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
2012-03-19 20:24 ` Jeff Layton
[not found] ` <20120319162410.42b95f13-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-03-19 20:48 ` Steve French
[not found] ` <CAH2r5mujZook3O2Ojvu+vjx5Y5uYuormbtbDW69iOLEf1XVQgg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-20 7:37 ` Pavel Shilovsky
[not found] ` <CAKywueTpa6Hmz7oQ=8S1ViRU9ky7wqhKN+f=eaWrJY1457X86w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-20 10:28 ` Jeff Layton
[not found] ` <20120320062843.1cd218ed-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2012-03-20 22:21 ` Steve French
2012-03-16 15:09 ` [PATCH v2 11/11] CIFS: Change mid_q_entry structure fields Pavel Shilovsky
[not found] ` <1331910574-998-12-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
2012-03-19 20:28 ` 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=20120319153905.5fe67738@redhat.com \
--to=jlayton-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=piastry-7qunaywFIewox3rIn2DAYQ@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