[<prev] [next>] [day] [month] [year] [list]
Message-ID: <5087E444.60008@citrix.com>
Date: Wed, 24 Oct 2012 14:51:16 +0200
From: Roger Pau Monné <roger.pau@...rix.com>
To: liuxiaolei1124 <liuxiaolei1124@....com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: about the patch: Persistent grant maps for xen blk drivers
On 24/10/12 14:40, liuxiaolei1124 wrote:
> Dear Roger:
>
> i have put the patch "Persistent grant maps for xen blk drivers"
> (https://lkml.org/lkml/2012/10/18/191) into my Dom0 which is 2.6.32.36.
> And when i start a vm, sometimes the blkback go to the BUG_ON.
I'm working on top of the next release (3.7.0-rc1), so I cannot assure
that this patch will work correctly on top of 2.6.32.36. I would
recommend you to switch to
git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git and apply
my patch on top of the linux-next branch to perform the testing.
> + for (i = 0, j = 0; i < nseg; i++) {
> + if (!persistent_gnts[i] || !persistent_gnts[i]->handle) {
> + /* This is a newly mapped grant */
> + BUG_ON(j >= segs_to_map); // BUG_ON here
> + if (unlikely(map[j].status != 0)) {
> + pr_debug(DRV_PFX "invalid buffer -- could not remap it\n");
> + map[j].handle = BLKBACK_INVALID_HANDLE;
> + ret |= 1;
> + if (persistent_gnts[i]) {
> + rb_erase(&persistent_gnts[i]->node,
> + &blkif->persistent_gnts);
> + blkif->persistent_gnt_c--;
> + kfree(persistent_gnts[i]);
> + persistent_gnts[i] = NULL;
> + }
> + }
> + }
>
> i don't understand when j >= segs_to_unmap ?
It should never happen, if j >= segs_to_unmap and we hit the bug it
means we are trying to process more segments than the ones we have mapped.
> And i make a test, i don't put the patch which in xen-blkfront.c into
> kernel, no matter i forced set pers_grants = 1 or set pers_grants = 0
> ,it's OK when i start a vm.
Do you have the dmesg from the DomU? Does it even start? Could you also
post the serial output of the crash (and the lines before the crash)?
Thanks for the testing, Roger.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists