Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Oct 2015 05:24:44 -0700
From:      Adrian Chadd <adrian.chadd@gmail.com>
To:        =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= <roger.pau@citrix.com>
Cc:        =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= <royger@freebsd.org>,  "src-committers@freebsd.org" <src-committers@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r289834 - head/sys/x86/x86
Message-ID:  <CAJ-Vmok2WnSe2DA6jf6eLsL=OGsUD2_1LgLFRJi3LAhYk5aMwA@mail.gmail.com>
In-Reply-To: <562A564D.9080703@citrix.com>
References:  <201510231539.t9NFdxPe018130@repo.freebsd.org> <562A564D.9080703@citrix.com>

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

I've started seeing panics on -head with ATA code doing a dmamap load
-> panic. I'll test by reverting this patch and see what happens, but
when it /does/ happen I can't get a crashdump, so debugging will be
less easy.

Has anyone else seen this?


-a


On 23 October 2015 at 08:46, Roger Pau Monn=C3=A9 <roger.pau@citrix.com> wr=
ote:
> El 23/10/15 a les 17.39, Roger Pau Monn=C3=A9 ha escrit:
>> Author: royger
>> Date: Fri Oct 23 15:39:59 2015
>> New Revision: 289834
>> URL: https://svnweb.freebsd.org/changeset/base/289834
>>
>> Log:
>>   x86/dma_bounce: rework _bus_dmamap_load_ma implementation
>>
>>   The implementation of bus_dmamap_load_ma_triv currently calls
>>   _bus_dmamap_load_phys on each page that is part of the passed in buffe=
r.
>>   Since each page is treated as an individual buffer, the resulting beha=
viour
>>   is different from the behaviour of _bus_dmamap_load_buffer. This break=
s
>>   certain drivers, like Xen blkfront.
>>
>>   If an unmapped buffer of size 4096 that starts at offset 13 into the f=
irst
>>   page is passed to the current _bus_dmamap_load_ma implementation (so t=
he ma
>>   array contains two pages), the result is that two segments are created=
, one
>>   with a size of 4083 and the other with size 13 (because two independan=
t
>>   calls to _bus_dmamap_load_phys are performed, one for each physical pa=
ge).
>>   If the same is done with a mapped buffer and calling _bus_dmamap_load_=
buffer
>>   the result is that only one segment is created, with a size of 4096.
>>
>>   This patch relegates the usage of bus_dmamap_load_ma_triv in x86 bounc=
e
>>   buffer code to drivers requesting BUS_DMA_KEEP_PG_OFFSET and implement=
s
>>   _bus_dmamap_load_ma so that it's behaviour is the same as the mapped v=
ersion
>>   (_bus_dmamap_load_buffer). This patch only modifies the x86 bounce buf=
fer
>>   code, other arches are left untouched.
>>
>>   Reviewed by:                kib, jah
>>   Differential Revision:      https://reviews.freebsd.org/D888
>>   Sponsored by:               Citrix Systems R&D
>
> Forgot to add:
>
> MFC after:      2 weeks
>
> Roger.
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmok2WnSe2DA6jf6eLsL=OGsUD2_1LgLFRJi3LAhYk5aMwA>