From: David Vrabel <david.vrabel@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
David Vrabel <david.vrabel@citrix.com>,
xen-devel@lists.xenproject.org
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCHv1] xen/evtchn: dynamically grow pending event channel ring
Date: Thu, 26 Nov 2015 19:07:22 +0000 [thread overview]
Message-ID: <5657586A.5090705@citrix.com> (raw)
In-Reply-To: <56575429.5000601@citrix.com>
On 26/11/15 18:49, Andrew Cooper wrote:
> On 26/11/15 16:14, David Vrabel wrote:
>> If more than 1024 event channels are bound to a evtchn device then it
>> possible (even with well behaved applications) for the ring to
>> overflow and events to be lost (reported as an -EFBIG error).
>>
>> Dynamically increase the size of the ring so there is always enough
>> space for all bound events. Well behaved applicables that only unmask
>> events after draining them from the ring can thus no longer lose
>> events.
>>
>> However, an application could unmask an event before draining it,
>> allowing multiple entries per port to accumulate in the ring, and a
>> overflow could still occur. So the overflow detection and reporting
>> is retained.
>>
>> The ring size is initially only 64 entries so the common use case of
>> an application only binding a few events will use less memory than
>> before. The ring size may grow to 512 KiB (enough for all 2^17
>> possible channels). This order 7 kmalloc() may fail due to memory
>> fragmentation, so we fall back to trying vmalloc().
>>
>> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
>
> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Applied to for-linus-4.4, thanks.
David
prev parent reply other threads:[~2015-11-26 19:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-26 16:14 [PATCHv1] xen/evtchn: dynamically grow pending event channel ring David Vrabel
2015-11-26 18:49 ` Andrew Cooper
2015-11-26 19:07 ` David Vrabel [this message]
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=5657586A.5090705@citrix.com \
--to=david.vrabel@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=xen-devel@lists.xenproject.org \
/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.