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]
Date:	Thu, 03 Apr 2008 18:12:58 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Dave Hansen <dave@...ux.vnet.ibm.com>
CC:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Yasunori Goto <y-goto@...fujitsu.com>,
	Ingo Molnar <mingo@...e.hu>,
	LKML <linux-kernel@...r.kernel.org>,
	Christoph Lameter <clameter@....com>
Subject: Re: [PATCH 5 of 6] hotplug-memory: add section_ops

Dave Hansen wrote:
> On Thu, 2008-04-03 at 17:05 -0700, Jeremy Fitzhardinge wrote:
>   
>> Add a per-section "section_ops" structure,  allowing each section to have
>> specific functions for onlining and offlining pages within the section.
>> This is used by the Xen balloon driver to make sure that pages are not
>> onlined without some physical memory backing them.
>>     
>
> This is kinda a lot of code and mucking around for what we actually get
> out of it, especially since you just condensed down all the actual
> online_page() instances.
>   

I agree, but it seemed like the most straightforward and architecturally 
cleanest approach to me.

> I think it might just be nicer to have a global list of these handlers
> somewhere.  The Xen driver can just say "put me on the list of
> callbacks" and we'll call them at online_page().  I really don't think
> we need to be passing an ops structure around.
>   

Yes, but it seems a bit awkward.  If we assume that:

   1. Xen will be the only user of the hook, and
   2. Xen-balloon hotplug is exclusive of real memory hotplug

then I guess its reasonable (though if that's the case it would be 
simpler to just put a direct call under #ifdef CONFIG_XEN_BALLOON in there).

But if we think there can be multiple callbacks, and they all get called 
on the online of each page, and there can be multiple kinds of hotplug 
memory it gets pretty messy.  Each has to determine "why was I called on 
this page?" and you'd to work out which one actually does the job of 
onlining.  It just seems cleaner to say "this section needs to be 
onlined like this", and there's no ambiguity.

I'm already anticipating using the ops mechanism to support another 
class of Xen hotplug memory for managing large pages.

    J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ