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: <5693AC71.8080400@citrix.com>
Date:	Mon, 11 Jan 2016 13:21:53 +0000
From:	David Vrabel <david.vrabel@...rix.com>
To:	Vitaly Kuznetsov <vkuznets@...hat.com>
CC:	<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
	<linux-acpi@...r.kernel.org>, Jonathan Corbet <corbet@....net>,
	"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
	Daniel Kiper <daniel.kiper@...cle.com>,
	Dan Williams <dan.j.williams@...el.com>,
	Tang Chen <tangchen@...fujitsu.com>,
	David Rientjes <rientjes@...gle.com>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
	Xishi Qiu <qiuxishi@...wei.com>,
	Mel Gorman <mgorman@...hsingularity.net>,
	"K. Y. Srinivasan" <kys@...rosoft.com>,
	"Igor Mammedov" <imammedo@...hat.com>, Kay Sievers <kay@...y.org>,
	"Konrad Rzeszutek Wilk" <konrad.wilk@...cle.com>,
	Boris Ostrovsky <boris.ostrovsky@...cle.com>
Subject: Re: [PATCH v3] memory-hotplug: add automatic onlining policy for
 the newly added memory

On 11/01/16 11:59, Vitaly Kuznetsov wrote:
> David Vrabel <david.vrabel@...rix.com> writes:
> 
>> On 07/01/16 17:23, Vitaly Kuznetsov wrote:
>>>
>>> - Changes since 'v1':
>>>   Add 'online' parameter to add_memory_resource() as it is being used by
>>>   xen ballon driver and it adds "empty" memory pages [David Vrabel].
>>>   (I don't completely understand what prevents manual onlining in this
>>>    case as we still have all newly added blocks in sysfs ... this is the
>>>    discussion point.)
>>
> 
> (there is a discussion with Daniel on the same topic in a parallel
> thread)
> 
>> I'm not sure what you're not understanding here?
>>
>> Memory added by the Xen balloon driver (whether populated with real
>> memory or not) does need to be onlined by udev or similar.
> 
> 
> Yes, same as all other memory hotplug mechanisms (hyper-v's balloon
> driver and acpi memory hotplug). My patch adds an option to make this
> happen automatically. Xen driver is currently excluded because of a
> deadlock. If this deadlock is the only problem we can easily change
> taking the lock to checking that the lock was taken (and taking in case
> it wasn't) or something similar and everything is going to work. From
> briefly looking at the code it seems to me it's going to work.

I don't think Linux has recursive mutex that we could use for this.

> What I wasn't sure about is 'empty pages' you were mentioning. In case
> there are some pages we can't online there should be a protection
> mechanism actively preventing them from going online (similar to
> hv_online_page() in Hyper-V driver) as this patch does nothing
> 'special' compared to udev onlining newly added blocks. 

'Empty' (or unpopulated) pages are those without any physical RAM
backing them.  Backend drivers map foreign (from other guest) pages into
these unpopulated pages.  i.e., accesses by the kernel to the virtual
addresses of these pages access memory shared by another guest.

These empty pages are ones we would prefer to be always automatically
onlined because they're hotplugged in response to requests from the
backend drivers.

Anyway, this series is fine with this Xen balloon driver limitation --
it can be addresses at a later date if necessary.

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ