All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>,
	"Christoph Hellwig" <hch@infradead.org>
Cc: linux-kernel@vger.kernel.org,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Dan Carpenter <dan.carpenter@oracle.com>, Wei Liu <wl@xen.org>,
	Yan Yankovskyi <yyankovskyi@gmail.com>,
	dri-devel@lists.freedesktop.org, xen-devel@lists.xenproject.org,
	linux-mm@kvack.org, David Hildenbrand <david@redhat.com>,
	Michal Hocko <mhocko@kernel.org>,
	Dan Williams <dan.j.williams@intel.com>
Subject: Re: [PATCH v4 2/2] xen: add helpers to allocate unpopulated memory
Date: Fri, 14 Aug 2020 12:27:32 +0200	[thread overview]
Message-ID: <a907ff4a-c887-7d02-1d45-140d7749afa4@suse.com> (raw)
In-Reply-To: <20200814095629.GJ975@Air-de-Roger>

On 14.08.20 11:56, Roger Pau Monné wrote:
> On Fri, Aug 14, 2020 at 08:29:20AM +0100, Christoph Hellwig wrote:
>> On Thu, Aug 13, 2020 at 09:54:20AM +0200, Roger Pau Monn?? wrote:
>>> On Thu, Aug 13, 2020 at 08:33:37AM +0100, Christoph Hellwig wrote:
>>>> On Tue, Aug 11, 2020 at 11:44:47AM +0200, Roger Pau Monne wrote:
>>>>> If enabled (because ZONE_DEVICE is supported) the usage of the new
>>>>> functionality untangles Xen balloon and RAM hotplug from the usage of
>>>>> unpopulated physical memory ranges to map foreign pages, which is the
>>>>> correct thing to do in order to avoid mappings of foreign pages depend
>>>>> on memory hotplug.
>>>>
>>>> So please just select ZONE_DEVICE if this is so much better rather
>>>> than maintaining two variants.
>>>
>>> We still need to other variant for Arm at least, so both need to be
>>> maintained anyway, even if we force ZONE_DEVICE on x86.
>>
>> Well, it still really helps reproducability if you stick to one
>> implementation of x86.
>>
>> The alternative would be an explicit config option to opt into it,
>> but just getting a different implementation based on a random
>> kernel option is strange.
> 
> Would adding something like the chunk below to the patch be OK?
> 
> ---8<---
> diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
> index 018020b91baa..5f321a1319e6 100644
> --- a/drivers/xen/Kconfig
> +++ b/drivers/xen/Kconfig
> @@ -328,7 +328,14 @@ config XEN_FRONT_PGDIR_SHBUF
>   	tristate
>   
>   config XEN_UNPOPULATED_ALLOC
> -	bool
> -	default y if ZONE_DEVICE && !ARM && !ARM64
> +	bool "Use unpopulated memory ranges for guest mappings"
> +	depends on X86
> +	select ZONE_DEVICE
> +	default y

I'd rather use "default XEN_BACKEND" here, as mappings of other guest's
memory is rarely used for non-backend guests.


Juergen


WARNING: multiple messages have this Message-ID (diff)
From: "Jürgen Groß" <jgross@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>,
	"Christoph Hellwig" <hch@infradead.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
	David Airlie <airlied@linux.ie>,
	Yan Yankovskyi <yyankovskyi@gmail.com>,
	David Hildenbrand <david@redhat.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Michal Hocko <mhocko@kernel.org>,
	linux-mm@kvack.org, xen-devel@lists.xenproject.org,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH v4 2/2] xen: add helpers to allocate unpopulated memory
Date: Fri, 14 Aug 2020 12:27:32 +0200	[thread overview]
Message-ID: <a907ff4a-c887-7d02-1d45-140d7749afa4@suse.com> (raw)
In-Reply-To: <20200814095629.GJ975@Air-de-Roger>

On 14.08.20 11:56, Roger Pau Monné wrote:
> On Fri, Aug 14, 2020 at 08:29:20AM +0100, Christoph Hellwig wrote:
>> On Thu, Aug 13, 2020 at 09:54:20AM +0200, Roger Pau Monn?? wrote:
>>> On Thu, Aug 13, 2020 at 08:33:37AM +0100, Christoph Hellwig wrote:
>>>> On Tue, Aug 11, 2020 at 11:44:47AM +0200, Roger Pau Monne wrote:
>>>>> If enabled (because ZONE_DEVICE is supported) the usage of the new
>>>>> functionality untangles Xen balloon and RAM hotplug from the usage of
>>>>> unpopulated physical memory ranges to map foreign pages, which is the
>>>>> correct thing to do in order to avoid mappings of foreign pages depend
>>>>> on memory hotplug.
>>>>
>>>> So please just select ZONE_DEVICE if this is so much better rather
>>>> than maintaining two variants.
>>>
>>> We still need to other variant for Arm at least, so both need to be
>>> maintained anyway, even if we force ZONE_DEVICE on x86.
>>
>> Well, it still really helps reproducability if you stick to one
>> implementation of x86.
>>
>> The alternative would be an explicit config option to opt into it,
>> but just getting a different implementation based on a random
>> kernel option is strange.
> 
> Would adding something like the chunk below to the patch be OK?
> 
> ---8<---
> diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
> index 018020b91baa..5f321a1319e6 100644
> --- a/drivers/xen/Kconfig
> +++ b/drivers/xen/Kconfig
> @@ -328,7 +328,14 @@ config XEN_FRONT_PGDIR_SHBUF
>   	tristate
>   
>   config XEN_UNPOPULATED_ALLOC
> -	bool
> -	default y if ZONE_DEVICE && !ARM && !ARM64
> +	bool "Use unpopulated memory ranges for guest mappings"
> +	depends on X86
> +	select ZONE_DEVICE
> +	default y

I'd rather use "default XEN_BACKEND" here, as mappings of other guest's
memory is rarely used for non-backend guests.


Juergen

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-08-14 10:27 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11  9:44 [PATCH v4 0/2] xen/balloon: fixes for memory hotplug Roger Pau Monne
2020-08-11  9:44 ` Roger Pau Monne
2020-08-11  9:44 ` [PATCH v4 1/2] memremap: rename MEMORY_DEVICE_DEVDAX to MEMORY_DEVICE_GENERIC Roger Pau Monne
2020-08-11  9:44   ` Roger Pau Monne
2020-08-11  9:44   ` Roger Pau Monne
2020-08-11 21:07   ` David Hildenbrand
2020-08-11 21:07     ` David Hildenbrand
2020-08-11 21:07     ` David Hildenbrand
2020-08-20 11:37     ` Roger Pau Monné
2020-08-20 11:37       ` Roger Pau Monné
2020-08-31 10:19       ` Roger Pau Monné
2020-08-31 10:19         ` Roger Pau Monné
2020-08-31 10:19         ` Roger Pau Monné
2020-08-31 20:56         ` Ira Weiny
2020-08-31 20:56           ` Ira Weiny
2020-08-31 19:20   ` Andrew Morton
2020-08-31 19:20     ` Andrew Morton
2020-08-11  9:44 ` [PATCH v4 2/2] xen: add helpers to allocate unpopulated memory Roger Pau Monne
2020-08-11  9:44   ` Roger Pau Monne
2020-08-11  9:44   ` Roger Pau Monne
2020-08-12  7:28   ` Jürgen Groß
2020-08-12  7:28     ` Jürgen Groß
2020-08-12  7:28     ` Jürgen Groß
2020-08-12  7:38     ` Roger Pau Monné
2020-08-12  7:38       ` Roger Pau Monné
2020-08-12  7:38       ` Roger Pau Monné
2020-08-12 18:13   ` kernel test robot
2020-08-12 18:13     ` kernel test robot
2020-08-13  7:33   ` Christoph Hellwig
2020-08-13  7:54     ` Roger Pau Monné
2020-08-13  7:54       ` Roger Pau Monné
2020-08-13  7:54       ` Roger Pau Monné
2020-08-13  9:49       ` Daniel Vetter
2020-08-13  9:49         ` Daniel Vetter
2020-08-13 10:02         ` Roger Pau Monné
2020-08-13 10:02           ` Roger Pau Monné
2020-08-14  7:29       ` Christoph Hellwig
2020-08-14  9:56         ` Roger Pau Monné
2020-08-14  9:56           ` Roger Pau Monné
2020-08-14  9:56           ` Roger Pau Monné
2020-08-14 10:27           ` Jürgen Groß [this message]
2020-08-14 10:27             ` Jürgen Groß
2020-08-14 12:47             ` Roger Pau Monné
2020-08-14 12:47               ` Roger Pau Monné
2020-08-14 12:54               ` Jürgen Groß
2020-08-14 12:54                 ` Jürgen Groß
2020-08-14 13:35                 ` Roger Pau Monné
2020-08-14 13:35                   ` Roger Pau Monné
2020-08-14 13:52                   ` Jürgen Groß
2020-08-14 13:52                     ` Jürgen Groß

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=a907ff4a-c887-7d02-1d45-140d7749afa4@suse.com \
    --to=jgross@suse.com \
    --cc=airlied@linux.ie \
    --cc=boris.ostrovsky@oracle.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dan.j.williams@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=david@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=yyankovskyi@gmail.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 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.