xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
To: Anil Madhavapeddy <anil@recoil.org>
Cc: xen-devel@lists.xensource.com, Stefano.Stabellini@eu.citrix.com,
	konrad.wilk@oracle.com, Ian.Jackson@eu.citrix.com,
	Ian.Campbell@eu.citrix.com,
	Vasiliy Tolstov <v.tolstov@ghs.l.google.com>
Subject: Re: [PATCH v6 0/3] libxenvchan: interdomain communications library
Date: Fri, 25 Nov 2011 11:53:07 -0500	[thread overview]
Message-ID: <4ECFC7F3.3080201@tycho.nsa.gov> (raw)
In-Reply-To: <20111124200235.GA21510@dark.recoil.org>

On 11/24/2011 03:02 PM, Anil Madhavapeddy wrote:
> On Fri, Sep 30, 2011 at 10:40:11AM -0400, Daniel De Graaf wrote:
>>>>
>>>> 2011/9/23 Daniel De Graaf <dgdegra@tycho.nsa.gov>
>>>>
>>>>> Changes since v5:
>>>>>  - Unify gntdev osdep interface
>>>>>  - Eliminate notify_result and revert mapping if notify ioctl fails
>>>>>  - Rename functions and structures to libxenvchan
>>>>>  - Use application-specified xenstore path for ring/event data
>>>>>  - Enforce maximum ring size of 2^20 bytes on client
>>>>>  - Change to LGPL 2.1
>>>>>
>>>>> [PATCH 1/3] libxc: add xc_gnttab_map_grant_ref_notify
>>>>> [PATCH 2/3] libxc: add xc_gntshr_* functions
>>>>> [PATCH 3/3] libvchan: interdomain communications library
>>>>>
> <snip>
>> This library depends on gntdev for the client and gntalloc for the server;
>> these were merged in 2.6.39. The client can be used with 2.6.32.x kernels
>> however it is not possible to detect when a peer crashes or exits without
>> calling libxenvchan_close() on that kernel.
> 
> I'm trying this with your most recent dom0 patches all included, and
> xen-unstable. In order to get decent performance, I tried the vchan-node
> examples with a cranked up buffer size, which fails immediately on 64-bit
> VMs.  This below patch fixes the xc_gntshr_share_pages call (which sets
> notify_offset to -1 and without this bounds check will send a big offset
> to the unmap notify ioctl).
> 
> With this, communication does work with the big buffers, but it never
> frees them, and so I can get an ENOSPACE error by calling vchan-node a few
> times. What's the intended cleanup path for the grants in normal use of
> the vchan library? Something's holding onto them, but I don't have a
> serial console on my current laptop in order to drop into Xen's serial and
> find out more.
> 

As long as things aren't crashing, you should be able to use "xl debug-key g"
and "xl dmesg" together to view the grant table debug output.

The ENOSPC bug is due to a missing gnttab_free_grant_reference call, the patch
to fix should be sent as a reply. The libxc patch fixing notify_offset is
incomplete; a more complete version will also be sent as a reply.

It is possible to observe this ENOSPC error even with proper cleanup if the
client refuses to release the grants it has mapped. Xen does not allow domains
to force unmapping of pages they have granted, so the best we can do is try to
remove any hanging grants on later gntalloc calls.

  reply	other threads:[~2011-11-25 16:53 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-19 14:38 [PATCH] libvchan: interdomain communications library Daniel De Graaf
2011-08-22  7:40 ` Vasiliy G Tolstov
2011-08-24 19:28   ` Konrad Rzeszutek Wilk
2011-08-22  9:15 ` Ian Campbell
2011-08-24 18:52   ` Daniel De Graaf
2011-08-25 10:27     ` Tim Deegan
2011-08-25 18:36       ` Jeremy Fitzhardinge
2011-08-24 18:52   ` [PATCH v2] " Daniel De Graaf
2011-08-26 14:01     ` Ian Jackson
2011-08-29 18:48       ` [PATCH v3] " Daniel De Graaf
2011-08-30 10:32         ` Ian Campbell
2011-08-31 19:17           ` Daniel De Graaf
2011-09-01 16:28             ` Ian Campbell
2011-09-01 16:47               ` Daniel De Graaf
2011-09-01 16:56                 ` Ian Jackson
2011-09-01 17:46                   ` Daniel De Graaf
2011-09-01 16:22 ` [PATCH v4 0/3] " Daniel De Graaf
2011-09-01 16:22   ` [PATCH 1/3] libxc: add xc_gnttab_map_grant_ref_notify Daniel De Graaf
2011-09-01 19:29     ` Konrad Rzeszutek Wilk
2011-09-01 16:22   ` [PATCH 2/3] libxc: add xc_gntshr_* functions Daniel De Graaf
2011-09-01 19:24     ` Konrad Rzeszutek Wilk
2011-09-01 16:22   ` [PATCH 3/3] libvchan: interdomain communications library Daniel De Graaf
2011-09-19 22:43 ` [PATCH v5 0/3] Daniel De Graaf
2011-09-19 22:43   ` [PATCH 1/3] libxc: add xc_gnttab_map_grant_ref_notify Daniel De Graaf
2011-09-21 10:03     ` Ian Campbell
2011-09-21 15:02       ` Daniel De Graaf
2011-09-21 15:25         ` Ian Campbell
2011-09-21 17:07           ` Daniel De Graaf
2011-09-22  8:32             ` Ian Campbell
2011-09-22 18:09               ` Daniel De Graaf
2011-09-19 22:43   ` [PATCH 2/3] libxc: add xc_gntshr_* functions Daniel De Graaf
2011-09-21 10:13     ` Ian Campbell
2011-09-19 22:43   ` [PATCH 3/3] libvchan: interdomain communications library Daniel De Graaf
2011-09-21 10:53     ` Ian Campbell
2011-09-21 16:31       ` Daniel De Graaf
2011-09-22  8:18         ` Ian Campbell
2011-09-21 13:44     ` Ian Campbell
2011-09-22 22:14 ` [PATCH v6 0/3] libxenvchan: " Daniel De Graaf
2011-09-22 22:14   ` [PATCH 1/3] libxc: add xc_gnttab_map_grant_ref_notify Daniel De Graaf
2011-09-30  9:16     ` Ian Campbell
2011-09-30 14:12       ` Ian Jackson
2011-09-30 14:17         ` Ian Campbell
2011-09-22 22:14   ` [PATCH 2/3] libxc: add xc_gntshr_* functions Daniel De Graaf
2011-09-22 22:14   ` [PATCH 3/3] libvchan: interdomain communications library Daniel De Graaf
2011-09-30  7:51   ` [PATCH v6 0/3] libxenvchan: " Vasiliy Tolstov
2011-09-30  8:28     ` Vasiliy Tolstov
2011-09-30 14:40       ` Daniel De Graaf
2011-11-24 20:02         ` Anil Madhavapeddy
2011-11-25 16:53           ` Daniel De Graaf [this message]
2011-11-25 16:54             ` [PATCH] libxc: Fix checks on grant notify arguments Daniel De Graaf
2011-12-01 18:20               ` Ian Jackson
2011-11-25 16:56             ` [PATCH 1/2] xen/events: prevent calling evtchn_get on invlaid channels Daniel De Graaf
2011-11-25 16:56               ` [PATCH 2/2] xen/gntalloc: release grant references on page free Daniel De Graaf
2011-11-25 18:37                 ` [PATCH] xen/gntalloc: fix reference counts on multi-page mappings Daniel De Graaf
2011-09-30  8:34   ` [PATCH v6 0/3] libxenvchan: interdomain communications library Ian Campbell
2011-09-30  8:37     ` [PATCH] libxc: osdep: report missing backends in common code Ian Campbell
2011-10-06 18:44     ` [PATCH v6 0/3] libxenvchan: interdomain communications library Ian Jackson
2011-10-07  8:41       ` Roger Pau Monné
2011-10-07  9:15         ` Keir Fraser
2011-10-07  9:48           ` Ian Jackson
2011-10-07 10:22             ` Roger Pau Monné

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=4ECFC7F3.3080201@tycho.nsa.gov \
    --to=dgdegra@tycho.nsa.gov \
    --cc=Ian.Campbell@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=anil@recoil.org \
    --cc=konrad.wilk@oracle.com \
    --cc=v.tolstov@ghs.l.google.com \
    --cc=xen-devel@lists.xensource.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).