From: David Vrabel <david.vrabel@citrix.com>
To: "Chentao(Boby)" <boby.chen@huawei.com>,
"konrad.wilk" <konrad.wilk@oracle.com>,
"Roger Pau Monné" <roger.pau@citrix.com>
Cc: meiwanlong@huawei.com, mu.muyang@huawei.com,
Yanqiangjun <yanqiangjun@huawei.com>,
liuyongan@huawei.com, huangzhichao@huawei.com,
xen-devel@lists.xenproject.org, dengguoqiang@huawei.com,
zhangmin <rudy.zhangmin@huawei.com>,
wu.wubin@huawei.com
Subject: Re: xen-blkback unmap with network retansmission will cause a coredump
Date: Mon, 22 Sep 2014 11:11:30 +0100 [thread overview]
Message-ID: <541FF5D2.8030002@citrix.com> (raw)
In-Reply-To: <541D5D8C.8020604@huawei.com>
On 20/09/14 11:57, Chentao(Boby) wrote:
> Hi konrad and roger,
>
> When xen-blkback module executes unmap operation, and at the same
> time the skb of network retansmission uses this map page, it will
> cause a crash of hostos.
>
> The crash stack of this problem is like below.
> <ffffffff8041133e>{do_page_fault+0x38e}
> <ffffffff8040d9e8>{page_fault+0x28} <ffffffff80223cdb>{memcpy+0xb}
> <ffffffff802325c2>{swiotlb_tbl_map_single+0x212}
> <ffffffff8023274a>{swiotlb_map_page+0x17a}
> <ffffffffa03468e6>{tg3:tg3_start_xmit+0x656}
> <ffffffff80354d14>{dev_hard_start_xmit+0x334}
> <ffffffff803721be>{sch_direct_xmit+0x1ae}
What dom0 (backend) kernel are you using? Which backend and what storage?
> I search website, found citrix engineers has met this problem long
> time ago. And I realized citrix engineers solve this problem
> according to modify kernel stack. Because this modification is very
> large, linux kernel community hasn't accept it until now. I have a
> immature thought, in dispatch_rw_block_io function, if this io is a
> write operation, we use grant copy hypercall instead of grant map
> hypercall. I verify my modification and it can solve this problem.
Switching to grant copy will reduce performance significantly in many cases.
This was fixed for user space backends by replacing the foreign mapping
with a mapping of a scratch page, when unmapping the grant.
Something similar should be done for kernel-only foreign mappings. This
requires a GNTOP_unmap_and_duplicate hypercall sub-op to allow efficient
batching.
David
next prev parent reply other threads:[~2014-09-22 10:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-20 10:57 xen-blkback unmap with network retansmission will cause a coredump Chentao(Boby)
2014-09-22 10:01 ` Roger Pau Monné
2014-09-23 13:27 ` Chentao(Boby)
2014-09-23 14:16 ` Roger Pau Monné
2014-09-22 10:11 ` David Vrabel [this message]
2014-09-23 13:36 ` Chentao(Boby)
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=541FF5D2.8030002@citrix.com \
--to=david.vrabel@citrix.com \
--cc=boby.chen@huawei.com \
--cc=dengguoqiang@huawei.com \
--cc=huangzhichao@huawei.com \
--cc=konrad.wilk@oracle.com \
--cc=liuyongan@huawei.com \
--cc=meiwanlong@huawei.com \
--cc=mu.muyang@huawei.com \
--cc=roger.pau@citrix.com \
--cc=rudy.zhangmin@huawei.com \
--cc=wu.wubin@huawei.com \
--cc=xen-devel@lists.xenproject.org \
--cc=yanqiangjun@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).