All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Paul Durrant <xadimgnik@gmail.com>
Cc: sstabellini@kernel.org, julien@xen.org, wl@xen.org,
	konrad.wilk@oracle.com, andrew.cooper3@citrix.com,
	ian.jackson@eu.citrix.com, george.dunlap@citrix.com,
	xen-devel@lists.xenproject.org, Volodymyr_Babchuk@epam.com,
	'David Woodhouse' <dwmw2@infradead.org>
Subject: Re: [Xen-devel] [PATCH 2/2] domain: use PGC_extra domheap page for shared_info
Date: Mon, 9 Mar 2020 09:54:43 +0100	[thread overview]
Message-ID: <f8f6f6db-f5ea-12eb-605a-0b53de992771@suse.com> (raw)
In-Reply-To: <000001d5f5ef$83780f10$8a682d30$@xen.org>

On 09.03.2020 09:48, Paul Durrant wrote:
>> -----Original Message-----
>> From: Jan Beulich <jbeulich@suse.com>
>> Sent: 06 March 2020 17:17
>> To: Paul Durrant <xadimgnik@gmail.com>
>> Cc: sstabellini@kernel.org; julien@xen.org; Volodymyr_Babchuk@epam.com; wl@xen.org;
>> konrad.wilk@oracle.com; andrew.cooper3@citrix.com; ian.jackson@eu.citrix.com;
>> george.dunlap@citrix.com; xen-devel@lists.xenproject.org; 'David Woodhouse' <dwmw2@infradead.org>
>> Subject: Re: [PATCH 2/2] domain: use PGC_extra domheap page for shared_info
>>
>> On 06.03.2020 17:27, Paul Durrant wrote:
>>>> -----Original Message-----
>>>> From: Jan Beulich <jbeulich@suse.com>
>>>> Sent: 06 March 2020 13:46
>>>> To: Paul Durrant <xadimgnik@gmail.com>
>>>> Cc: sstabellini@kernel.org; julien@xen.org; Volodymyr_Babchuk@epam.com; wl@xen.org;
>>>> konrad.wilk@oracle.com; andrew.cooper3@citrix.com; ian.jackson@eu.citrix.com;
>>>> george.dunlap@citrix.com; xen-devel@lists.xenproject.org; 'David Woodhouse' <dwmw2@infradead.org>
>>>> Subject: Re: [PATCH 2/2] domain: use PGC_extra domheap page for shared_info
>>>>
>>>> On 06.03.2020 14:41, Paul Durrant wrote:
>>>>>> -----Original Message-----
>>>>>> From: Jan Beulich <jbeulich@suse.com>
>>>>>> Sent: 06 March 2020 13:36
>>>>>> To: Paul Durrant <xadimgnik@gmail.com>
>>>>>> Cc: sstabellini@kernel.org; julien@xen.org; Volodymyr_Babchuk@epam.com; wl@xen.org;
>>>>>> konrad.wilk@oracle.com; andrew.cooper3@citrix.com; ian.jackson@eu.citrix.com;
>>>>>> george.dunlap@citrix.com; xen-devel@lists.xenproject.org; 'David Woodhouse' <dwmw2@infradead.org>
>>>>>> Subject: Re: [PATCH 2/2] domain: use PGC_extra domheap page for shared_info
>>>>>>
>>>>>> On 06.03.2020 14:26, Paul Durrant wrote:
>>>>>>>> From: Xen-devel <xen-devel-bounces@lists.xenproject.org> On Behalf Of Jan Beulich
>>>>>>>> Sent: 06 March 2020 13:24
>>>>>>>>
>>>>>>>> On 06.03.2020 14:13, Paul Durrant wrote:
>>>>>>>>> My aim is to make the separation abundantly obvious by getting rid
>>>>>>>>> of shared xenheap pages (for non-system domains at least) but I
>>>>>>>>> can't do that before converting shared_info and grant shared/status
>>>>>>>>> frames to domheap.
>>>>>>>>
>>>>>>>> Following David's various replies - instead of going this route of
>>>>>>>> replacing the sharing of xenheap pages by different logic, the
>>>>>>>> same ought to be achievable by making the backing allocations come
>>>>>>>> from the correct pool?
>>>>>>>>
>>>>>>>
>>>>>>> I still prefer the simplification of not having to clean up the
>>>>>>> shared xenheap page list in domain_kill() so IMO it is still worth
>>>>>>> it for that alone.
>>>>>>
>>>>>> I don't see anything very special with the cleaning up in
>>>>>> domain_kill() / domain_relinquish_resources(). What I'd view as
>>>>>> more desirable in this regard is the general fact of needing
>>>>>> two lists. But you realize there's a downside to this as well?
>>>>>> dump_pageframe_info() will reliably show _all_ Xen heap pages
>>>>>> associated with a domain, but it will only ever show up to 10
>>>>>> pages on ->page_list for a domain that's not already being
>>>>>> cleaned up.
>>>>>
>>>>> That's not much of a downside though I don't think. The xenheap
>>>>> (or PGC_extra domheap pages) are 'special' and so info about
>>>>> them ought to be available via an alternate dump function anyway
>>>>> (and if not already, it can be added).
>>>>
>>>> Whatever you'd add, the logic would need to either traverse the
>>>> entire ->page_list (can take very long) or have/use out of band
>>>> information where such pages may have a record (fragile).
>>>>
>>>
>>> But the shared xenheap pages in question are only shared info, or
>>> grant table, so their information can be dumped separately.
>>> I guess it makes more sense to add another patch into the series
>>> to do explicit dump of shared_info and then exclude 'special'
>>> pages from dump_pageframe_info().
>>
>> Bu that's why I said "fragile" - new uses of such pages wouldn't
>> automatically be picked up, whereas them all landing on xenpage_list
>> made their dumping a reliable thing.
>>
> 
> But how useful is dumping xenheap pages this way? There's nothing
> that actually says what they are for so I can't see why it is
> particularly useful.

That's no different from the domheap page list dumping. The main
point of it - aiui - is to have a hook on finding where possible
leaks sit. For xenheap pages, actually, one can (currently) infer
what they are used for from their position on the list, I think.

> Having something that says 'This is the shared_info page' and
> 'These are the grant shared frames' seems much more desirable...
> and any new ones added would almost certainly merit similar dump
> functions.

Possibly, yet that's different (partly extended, partly
orthogonal) functionality. Doing such may indeed be useful.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2020-03-09  8:55 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25  9:53 [Xen-devel] [PATCH 0/2] remove one more shared xenheap page: shared_info Paul Durrant
2020-02-25  9:53 ` [Xen-devel] [PATCH 1/2] domain: introduce alloc/free_shared_info() helpers Paul Durrant
2020-02-26  8:03   ` Julien Grall
2020-02-25  9:53 ` [Xen-devel] [PATCH 2/2] domain: use PGC_extra domheap page for shared_info Paul Durrant
2020-02-26 11:33   ` Julien Grall
2020-02-26 11:43     ` Jan Beulich
2020-02-26 12:03     ` Durrant, Paul
2020-02-26 14:22       ` Julien Grall
2020-02-26 14:44         ` Jan Beulich
2020-02-26 11:46   ` Andrew Cooper
2020-02-26 11:53     ` Durrant, Paul
2020-02-26 13:57   ` Jan Beulich
2020-02-26 14:05     ` Durrant, Paul
2020-02-26 15:23       ` Jan Beulich
2020-02-26 16:12         ` Julien Grall
2020-02-26 16:53           ` Woodhouse, David
2020-03-06 11:37             ` Jan Beulich
2020-03-06 11:52               ` David Woodhouse
2020-03-06 11:59                 ` Durrant, Paul
2020-03-06 12:29                   ` Jan Beulich
2020-03-06 12:49                     ` David Woodhouse
2020-03-06 12:25                 ` Jan Beulich
2020-03-06 12:37                   ` David Woodhouse
2020-03-06 12:55                     ` Jan Beulich
2020-03-06 13:08                       ` David Woodhouse
2020-03-06 12:20               ` David Woodhouse
2020-03-06 12:36                 ` Jan Beulich
2020-03-06 12:57                   ` David Woodhouse
2020-03-06 13:10                     ` Jan Beulich
2020-03-06 13:13                       ` Paul Durrant
2020-03-06 13:23                         ` Jan Beulich
2020-03-06 13:26                           ` Paul Durrant
2020-03-06 13:36                             ` Jan Beulich
2020-03-06 13:41                               ` Paul Durrant
2020-03-06 13:46                                 ` Jan Beulich
2020-03-06 16:27                                   ` Paul Durrant
2020-03-06 17:16                                     ` Jan Beulich
2020-03-09  8:48                                       ` Paul Durrant
2020-03-09  8:54                                         ` Jan Beulich [this message]
2020-03-06 13:15                       ` David Woodhouse
2020-03-06 13:22                         ` [Xen-devel] [EXTERNAL][PATCH " Paul Durrant

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=f8f6f6db-f5ea-12eb-605a-0b53de992771@suse.com \
    --to=jbeulich@suse.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dwmw2@infradead.org \
    --cc=george.dunlap@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=julien@xen.org \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xadimgnik@gmail.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.