lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <226413fc-ef25-59bd-772f-79012fda0ee3@suse.com>
Date:   Wed, 2 Sep 2020 12:15:25 +0200
From:   Jürgen Groß <jgross@...e.com>
To:     David Hildenbrand <david@...hat.com>, linux-kernel@...r.kernel.org
Cc:     virtualization@...ts.linux-foundation.org, linux-mm@...ck.org,
        linux-hyperv@...r.kernel.org, xen-devel@...ts.xenproject.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...e.com>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Stefano Stabellini <sstabellini@...nel.org>,
        Roger Pau Monné <roger.pau@...rix.com>,
        Julien Grall <julien@....org>,
        Pankaj Gupta <pankaj.gupta.linux@...il.com>,
        Baoquan He <bhe@...hat.com>,
        Wei Yang <richardw.yang@...ux.intel.com>
Subject: Re: [PATCH v1 4/5] xen/balloon: try to merge system ram resources

On 21.08.20 12:34, David Hildenbrand wrote:
> Let's reuse the new mechanism to merge system ram resources below the
> root. We are the only one hotplugging system ram (e.g., DIMMs don't apply),
> so this is safe to be used.
> 
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Michal Hocko <mhocko@...e.com>
> Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>
> Cc: Juergen Gross <jgross@...e.com>
> Cc: Stefano Stabellini <sstabellini@...nel.org>
> Cc: Roger Pau Monné <roger.pau@...rix.com>
> Cc: Julien Grall <julien@....org>
> Cc: Pankaj Gupta <pankaj.gupta.linux@...il.com>
> Cc: Baoquan He <bhe@...hat.com>
> Cc: Wei Yang <richardw.yang@...ux.intel.com>
> Signed-off-by: David Hildenbrand <david@...hat.com>
> ---
>   drivers/xen/balloon.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
> index 37ffccda8bb87..5ec73f752b8a7 100644
> --- a/drivers/xen/balloon.c
> +++ b/drivers/xen/balloon.c
> @@ -338,6 +338,10 @@ static enum bp_state reserve_additional_memory(void)
>   	if (rc) {
>   		pr_warn("Cannot add additional memory (%i)\n", rc);
>   		goto err;
> +	} else {
> +		resource = NULL;
> +		/* Try to reduce the number of system ram resources. */
> +		merge_system_ram_resources(&iomem_resource);
>   	}

I don't see the need for setting resource to NULL and to use an "else"
clause here.


Juergen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ