Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Apr 2022 09:39:45 +0200
From:      Roger Pau =?utf-8?B?TW9ubsOp?= <roger.pau@citrix.com>
To:        Ze Dupsys <zedupsys@gmail.com>
Cc:        <freebsd-xen@freebsd.org>, <buhrow@nfbcal.org>
Subject:   Re: ZFS + FreeBSD XEN dom0 panic
Message-ID:  <YlfPwa/RFJYN9Qk7@Air-de-Roger>
In-Reply-To: <f00bdfb0-4485-038b-387f-57161242b9ca@gmail.com>
References:  <48b74c39-abb3-0a3e-91a8-b5ab1e1223ce@gmail.com> <YkAqxjiMM1M1QdgR@Air-de-Roger> <22643831-70d3-5a3e-f973-fb80957e80dc@gmail.com> <Ykxev3fangqRGQcn@Air-de-Roger> <209c9b7c-4b4b-7fe3-6e73-d2a0dc651c19@gmail.com> <YlBOgFYNokZ0rTgD@Air-de-Roger> <1286cb59-867e-e7d0-2bd3-45c33feae66a@gmail.com> <YlRLN7aAxYzgb7kr@Air-de-Roger> <YlWczLNsrTpNjk5P@Air-de-Roger> <f00bdfb0-4485-038b-387f-57161242b9ca@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 14, 2022 at 09:47:19AM +0300, Ze Dupsys wrote:
> On 2022.04.12. 18:37, Roger Pau Monné wrote:
> > 
> > I have a patch to disable the bounce buffering done in blkback
> > (attached).
> 
> Regarding this patch, it wouldn't apply on RELEASE 13.0 code, because i
> guess there are other changes, when updating code manually i got compile
> error, variable xen_cpuid_base not defined, and include paths do not have
> <contrib> at the start.
> 
> So i applied it manually to main branch, commit:
> 2f0baec1ecb2e79cfb97a19e1bbfb27741365847, since there at least variable
> xen_cpuid_base existed.

Right, there's some context to be backported to stable/13 for it to
apply correctly.

> 
> > While I think it's not directly related to the panic you are hitting,
> > it's long time since we should have disabled that.  It should reduce
> > the memory consumption by blkback greatly, so might have the side
> > effect of helping with your issue related to pmap_growkernel.
> 
> I think i do not understand this clearly. Was it an obsolete feature that
> had to be removed?

It's a workaround that we had in FreeBSD to deal with older Xen
versions not creating proper mappings for grant references. This is
now all fixed in Xen since quite some time ago, so we can drop the
workaround in FreeBSD.

Such workaround implemented bounce buffering in blkback, which takes
an awful lot of memory.

> 
> > On my test box a single instance of blkback reduced memory usage from
> > ~100M to ~300K.
> 
> On my lab system this seems to work quiet niceley as well. System is under
> load now for 17:36 hours, no panic, collecting vmstat. And what else is
> different, that VM start/stop script has not printed any error about adding
> block devices.
> 
> So this seems promissing.

Thanks. I will groom those patches in order to prepare them for
commit. Regardless of whether there are other issues still lurking I
think those changes are worth committing now.

Regards, Roger.



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