Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Apr 2019 11:53:42 -0400
From:      Tycho Nightingale <tycho@pobox.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Hans Petter Selasky <hps@selasky.org>, Niclas Zeising <zeising@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r346958 - head/sys/compat/linuxkpi/common/src
Message-ID:  <7927F561-6922-4960-90EC-BD36E0190A6F@pobox.com>
In-Reply-To: <CANCZdfqV5BPcQx0iC7wpvttmvxwyfEkb7XQVrRMPp2Jk_bqYTQ@mail.gmail.com>
References:  <201904301041.x3UAfLvj054368@repo.freebsd.org> <8f360678-2df1-fe7b-cb83-f47923534826@freebsd.org> <2f77d9f2-833d-f614-e193-a369086c01cf@selasky.org> <CANCZdfqV5BPcQx0iC7wpvttmvxwyfEkb7XQVrRMPp2Jk_bqYTQ@mail.gmail.com>

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

> On Apr 30, 2019, at 11:24 AM, Warner Losh <imp@bsdimp.com> wrote:
>=20
>=20
> On Tue, Apr 30, 2019 at 9:17 AM Hans Petter Selasky <hps@selasky.org =
<mailto:hps@selasky.org>> wrote:
> On 4/30/19 3:10 PM, Niclas Zeising wrote:
> > On 2019-04-30 12:41, Hans Petter Selasky wrote:
> >> Author: hselasky
> >> Date: Tue Apr 30 10:41:20 2019
> >> New Revision: 346958
> >> URL: https://svnweb.freebsd.org/changeset/base/346958 =
<https://svnweb.freebsd.org/changeset/base/346958>;
> >>
> >> Log:
> >>    Reduce the number of mutexes after r346645 in the LinuxKPI.
> >>    Make function macro wrappers for locking and unlocking to ease=20=

> >> readability.
> >>    No functional change.
> >>    Discussed with:        kib@, tychon@ and zeising@
> >=20
> > I was not part of any discussion regarding this.  If this is related =
to=20
> > https://reviews.freebsd.org/D20097 =
<https://reviews.freebsd.org/D20097>; I explicitly asked you on gitter to=20=

> > hold of for a bit, while we try to figure out why we are seeing=20
> > regressions in graphics with the latest dmar changes.
> >=20
> > Can you please revert this since it colludes the dmar graphics =
issue,=20
> > and it makes the suggested patch not apply cleanly, which makes it=20=

> > harder to get people to help test.
> > Thank you!
> > Regards
>=20
> In response to your request I've collected fixes for all the known=20
> LinuxKPI+DMA issues at:
> https://reviews.freebsd.org/D20097 =
<https://reviews.freebsd.org/D20097>;
>=20
> It is based on top of the latest -current.
>=20
> Hopefully this will solve the problem. Do you have any idea of when we =
might see resolution of this issue? I'd like to see it fixed by Friday =
either with fixes or a revert. Do you think that's a reasonable time =
frame? If not, what do you think a reasonable time frame will be? I know =
we have a number of unknowns to factor in, so my queries are  based on =
our best guesses.

Friday seems reasonable.

The issues that have been exposed are that several callers of the Linux =
API are not compliant with the documented API.  For example according to =
the documentation, dma_map_sg() may coalesce entries and our current =
implementation does that.  This broke some graphics drivers. To support =
these drivers, going back to the non-coalesced version is the only path =
forward as the callee bugs redefine this API de facto; this is included =
in D20097.

Also included in D20097 is a fix to ensure sg_dma_len() is equal to =
sg->length =E2=80=94 again to address assumptions in drivers.

Finally, apparently some drivers load the same DMA address multiple =
times without any prior unload.  Those drivers need to work too; D20097 =
contains a fix.

Thanks hps@ for helping out!

Tycho=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7927F561-6922-4960-90EC-BD36E0190A6F>