From: Julien Grall <julien@xen.org>
To: Jan Beulich <jbeulich@suse.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
George Dunlap <george.dunlap@citrix.com>,
Ian Jackson <iwj@xenproject.org>,
Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>
Subject: Re: [PATCH v4] gnttab: defer allocation of status frame tracking array
Date: Wed, 5 May 2021 09:26:35 +0100 [thread overview]
Message-ID: <f23ed85d-a906-a8b3-edba-48eb376c0633@xen.org> (raw)
In-Reply-To: <74048f89-fee7-06c2-ffd5-6e5a14bdf440@suse.com>
Hi Jan,
On 04/05/2021 09:42, Jan Beulich wrote:
> This array can be large when many grant frames are permitted; avoid
> allocating it when it's not going to be used anyway, by doing this only
> in gnttab_populate_status_frames(). While the delaying of the respective
> memory allocation adds possible reasons for failure of the respective
> enclosing operations, there are other memory allocations there already,
> so callers can't expect these operations to always succeed anyway.
>
> As to the re-ordering at the end of gnttab_unpopulate_status_frames(),
> this is merely to represent intended order of actions (shrink array
> bound, then free higher array entries). If there were racing accesses,
> suitable barriers would need adding in addition.
Please drop the last sentence, this is at best misleading because you
can't just add barriers to make it race free (see the discussion on v2
for more details).
With the sentence dropped:
Reviewed-by: Julien Grall <jgrall@amazon.com>
Cheers,
[1] <f82ddfe7-853d-ca15-2373-a38068f65ef7@xen.org>
--
Julien Grall
next prev parent reply other threads:[~2021-05-05 8:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 8:42 [PATCH v4] gnttab: defer allocation of status frame tracking array Jan Beulich
2021-05-05 8:26 ` Julien Grall [this message]
2021-05-05 10:49 ` Andrew Cooper
2021-05-05 11:12 ` Jan Beulich
2021-05-05 12:13 ` Julien Grall
2021-05-07 7:46 ` Jan Beulich
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=f23ed85d-a906-a8b3-edba-48eb376c0633@xen.org \
--to=julien@xen.org \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=iwj@xenproject.org \
--cc=jbeulich@suse.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--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 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).