From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 2/4] build: Alloc space for sched list in the link file Date: Fri, 18 Dec 2015 17:10:58 +0000 Message-ID: <56743E22.4010502@citrix.com> References: <1450385974-12732-1-git-send-email-jonathan.creekmore@gmail.com> <1450385974-12732-3-git-send-email-jonathan.creekmore@gmail.com> <5673CB60.2050703@citrix.com> <567438F2.1030406@citrix.com> <56744B6B02000078000C16D9@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a9yYZ-0001vy-Ef for xen-devel@lists.xenproject.org; Fri, 18 Dec 2015 17:11:03 +0000 In-Reply-To: <56744B6B02000078000C16D9@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , Jonathan Creekmore Cc: xen-devel@lists.xenproject.org, Keir Fraser , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 18/12/15 17:07, Jan Beulich wrote: >>>> On 18.12.15 at 17:48, wrote: >> On 18/12/15 16:40, Jonathan Creekmore wrote: >>>> On Dec 18, 2015, at 3:01 AM, Andrew Cooper wrote: >>>> >>>> On 17/12/2015 20:59, Jonathan Creekmore wrote: >>>>> Creates a section to contain scheduler entry pointers that are gathered >>>>> together into an array. This will allow, in a follow-on patch, scheduler >>>>> entries to be automatically gathered together into the array for >>>>> automatic parsing. >>>>> >>>>> CC: Ian Campbell >>>>> CC: Stefano Stabellini >>>>> CC: Keir Fraser >>>>> CC: Jan Beulich >>>>> CC: Andrew Cooper >>>>> Signed-off-by: Jonathan Creekmore >>>>> --- >>>>> xen/arch/arm/xen.lds.S | 4 ++++ >>>>> xen/arch/x86/xen.lds.S | 4 ++++ >>>>> 2 files changed, 8 insertions(+) >>>>> >>>>> diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S >>>>> index 0488f37..39a4c86 100644 >>>>> --- a/xen/arch/arm/xen.lds.S >>>>> +++ b/xen/arch/arm/xen.lds.S >>>>> @@ -57,6 +57,10 @@ SECTIONS >>>>> . = ALIGN(PAGE_SIZE); >>>>> *(.data.page_aligned) >>>>> *(.data) >>>>> + . = ALIGN(8); >>>>> + __schedulers_start = .; >>>>> + *(.data.schedulers) >>>>> + __schedulers_end = .; >>>> These arrays are only ever used in __init scheduler_init(). They should >>>> be in .init.data rather than .data, which allows their memory to be >>>> reclaimed after boot. >>>> >>>> With that, Reviewed-by: Andrew Cooper >>> So, they are used in scheduler_init() which is marked __init, but >> scheduler_alloc >>> also uses that array (and did before my patch) and it is not marked __init. >> Ah yes - so they are. Apologies for the noise. This should be in .data >> and my R-b stands. > In .rodata perhaps? Ah yes - they don't need modifying at all. They are just pointers to each of the struct scheduler ops. .rodata it is. ~Andrew