Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 May 2012 01:29:46 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Mateusz Guzik <mjg@semihalf.com>
Cc:        svn-src-projects@freebsd.org, Grzegorz Bernacki <gber@freebsd.org>, src-committers@freebsd.org
Subject:   Re: svn commit: r233072 - projects/nand/sys/kern
Message-ID:  <20120517222946.GA2358@deviant.kiev.zoral.com.ua>
In-Reply-To: <20120511154810.GA99005@pcbsd-2342.semihalf.com>
References:  <20120317161050.GI75778@deviant.kiev.zoral.com.ua> <4FA8FFB9.7090002@freebsd.org> <20120508095631.GV2358@deviant.kiev.zoral.com.ua> <4FA94609.3060306@freebsd.org> <20120510103105.GG2358@deviant.kiev.zoral.com.ua> <4FABC64F.3060502@freebsd.org> <20120510115857.GH2358@deviant.kiev.zoral.com.ua> <20120510164519.GA13258@pcbsd-2342.semihalf.com> <20120511104648.GM2358@deviant.kiev.zoral.com.ua> <20120511154810.GA99005@pcbsd-2342.semihalf.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--utUizcr4eQAkV3Ky
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, May 11, 2012 at 05:48:10PM +0200, Mateusz Guzik wrote:
> On Fri, May 11, 2012 at 01:46:48PM +0300, Konstantin Belousov wrote:
> > On Thu, May 10, 2012 at 06:45:19PM +0200, Mateusz Guzik wrote:
> > > http://people.freebsd.org/~raj/patches/misc/vfs_highdirtybuf.diff
> > >=20
> > > callbacks are expected to increase flushed counter if they happend to
> > > flush some buffers.
> > I do not think this is right. You need to call a routine when getnewblk=
()
> > is unable to find a buffer to recycle.
> >=20
> > As I understand, in your situation with lot of managed buffers, the dir=
ty
> > queue could be just empty.
>=20
> I don't think I follow. Is your concern that with a lot of managed buffer=
s and
> empty dirty queue nothing can be recycled? Or that managed buffers
> affect calls to buf_do_flush?
>=20
> I presume you talk about the code below the following:
>         /*
>          * If we exhausted our list, sleep as appropriate.  We may have to
>          * wakeup various daemons and write out some dirty buffers.
>          *
>          * Generally we are sleeping due to insufficient buffer space.
>          */
>=20
>         if (bp =3D=3D NULL) {
>=20
> Conditions that cause bufdaemon weakups/buf_do_flush calls seem to be
> not dependent on buffers being managed or not.
My concern is that you use unappropriate terminology at first, and this
leads to mostly no-op code as a consequence.

If you use managed buffers, not only you should flush dirty buffers when
bufdaemon is kicked, but you also need to actually return some buffers
to the clean or empty queues. Otherwise, the condition which caused
getnewbuf() allocation failure will persist.
>=20
> buf_do_flush with our change always calls registered callbacks and the
> callback that we register calls code that knowns what nandfs managed
> buffers are dirty and flushes those. Buffers from dirty queues (if any)
> are flushed separately.
>=20
> If I'm wrong or misunderstood you, please elaborate on problem you have
> in mind.
>=20
> > >=20
> > > Example proof-of-concept (will be cleaned up) change for nandfs:
> > > http://people.freebsd.org/~raj/patches/misc/nandfs_vfs_highdirtybuf.d=
iff
> > >=20
> > > Does this look reasonable?

The vfs_bio.c change is probably fine, but I have doubts that nandfs patch
will change anything for the reasons I described above. On the other hand,
I did not read nandfs code, so I may be wrong.

--utUizcr4eQAkV3Ky
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (FreeBSD)

iEYEARECAAYFAk+1e9kACgkQC3+MBN1Mb4izIQCfVCG/GvPIR3KtZaWVCSmIB2QL
ly4AnRyZ1VB4X+SW1Usc7pQVK54jWmYB
=XE4x
-----END PGP SIGNATURE-----

--utUizcr4eQAkV3Ky--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120517222946.GA2358>