From: "Roger Pau Monné" <roger.pau@citrix.com>
To: liuxiaolei1124 <liuxiaolei1124@163.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: about the patch: Persistent grant maps for xen blk drivers
Date: Wed, 24 Oct 2012 14:51:16 +0200 [thread overview]
Message-ID: <5087E444.60008@citrix.com> (raw)
In-Reply-To: <6fa672f0.1d1fd.13a92ca063b.Coremail.liuxiaolei1124@163.com>
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.
parent reply other threads:[~2012-10-24 12:51 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <6fa672f0.1d1fd.13a92ca063b.Coremail.liuxiaolei1124@163.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5087E444.60008@citrix.com \
--to=roger.pau@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liuxiaolei1124@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.