All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jonathan Creekmore <jonathan.creekmore@gmail.com>,
	Jan Beulich <JBeulich@suse.com>
Cc: xen-devel@lists.xenproject.org, Keir Fraser <keir@xen.org>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH 2/4] build: Alloc space for sched list in the link file
Date: Fri, 18 Dec 2015 17:23:27 +0000	[thread overview]
Message-ID: <5674410F.3080505@citrix.com> (raw)
In-Reply-To: <F59C9ACC-C7EC-4BA1-BE14-DB7F16550EA2@gmail.com>

On 18/12/15 17:11, Jonathan Creekmore wrote:
>> On Dec 18, 2015, at 11:07 AM, Jan Beulich <JBeulich@suse.com> wrote:
>>
>>>>> On 18.12.15 at 17:48, <andrew.cooper3@citrix.com> wrote:
>>> On 18/12/15 16:40, Jonathan Creekmore wrote:
>>>>> On Dec 18, 2015, at 3:01 AM, Andrew Cooper <andrew.cooper3@citrix.com> 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 <ian.campbell@citrix.com>
>>>>>> CC: Stefano Stabellini <stefano.stabellini@citrix.com>
>>>>>> CC: Keir Fraser <keir@xen.org>
>>>>>> CC: Jan Beulich <jbeulich@suse.com>
>>>>>> CC: Andrew Cooper <andrew.cooper3@citrix.com>
>>>>>> Signed-off-by: Jonathan Creekmore <jonathan.creekmore@gmail.com>
>>>>>> ---
>>>>>> 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 <andrew.cooper3@citrix.com>
>>>> 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?
> I initially put it in .rodata, but the current algorithm for choosing the scheduler NULLs out
> the pointers in the array if the global_init() function fails. To emulate that behavior, I had to 
> move the section to .data instead of .rodata.

Hmm.  That is unfortunate.

Best to leave it in .data, and leave fixing the scheduler initialisation
to the other scheduler clean-up work; there is plenty of other cleanup
work to do, and conflating the two issues is best avoided.

~Andrew

  reply	other threads:[~2015-12-18 17:23 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-17 20:59 [PATCH 0/4] Allow schedulers to be selectable through Kconfig Jonathan Creekmore
2015-12-17 20:59 ` [PATCH 1/4] build: Hook the schedulers into Kconfig Jonathan Creekmore
2015-12-18  1:35   ` Dario Faggioli
2015-12-18  2:20     ` Jonathan Creekmore
2015-12-18  9:19       ` Dario Faggioli
2015-12-18 10:52     ` George Dunlap
2015-12-18 11:23       ` Dario Faggioli
2015-12-18  8:57   ` Andrew Cooper
2015-12-18 16:43     ` Jonathan Creekmore
2015-12-17 20:59 ` [PATCH 2/4] build: Alloc space for sched list in the link file Jonathan Creekmore
2015-12-18  9:01   ` Andrew Cooper
2015-12-18 16:40     ` Jonathan Creekmore
2015-12-18 16:48       ` Andrew Cooper
2015-12-18 17:07         ` Jan Beulich
2015-12-18 17:10           ` Andrew Cooper
2015-12-18 17:11           ` Jonathan Creekmore
2015-12-18 17:23             ` Andrew Cooper [this message]
2015-12-17 20:59 ` [PATCH 3/4] sched: Register the schedulers into the list Jonathan Creekmore
2015-12-18  1:42   ` Dario Faggioli
2015-12-18  9:03   ` Andrew Cooper
2015-12-17 20:59 ` [PATCH 4/4] sched: Use the auto-generated list of schedulers Jonathan Creekmore
2015-12-18  1:47   ` Dario Faggioli
2015-12-18  9:12   ` Andrew Cooper
2015-12-18 16:44     ` Jonathan Creekmore
2015-12-18 10:50   ` Jan Beulich
2015-12-18 16:00     ` Jonathan Creekmore
2015-12-18 16:43       ` Jan Beulich
2015-12-18 17:24         ` Jonathan Creekmore
2015-12-18 17:30           ` Andrew Cooper
2015-12-18 10:39 ` [PATCH 0/4] Allow schedulers to be selectable through Kconfig Jan Beulich
2015-12-18 10:45 ` Ian Campbell
2015-12-18 10:58   ` Jan Beulich
2015-12-18 11:08   ` Juergen Gross
2015-12-18 11:19     ` Ian Campbell
2015-12-18 11:30     ` Jan Beulich
     [not found]     ` <5673FC6202000078000C122B@suse.com>
2015-12-18 11:41       ` Juergen Gross
2015-12-18 17:56   ` Doug Goldstein
2015-12-18 18:25     ` Andrew Cooper
2016-01-06 14:45     ` Ian Campbell
2016-01-07 14:01       ` Jonathan Creekmore
2016-01-07 14:37         ` Jan Beulich
2016-01-07 15:00           ` Ian Campbell
2016-01-07 15:18             ` Doug Goldstein
2016-01-07 15:31               ` Ian Campbell
2016-01-07 15:43               ` Jonathan Creekmore
2016-01-07 15:54                 ` Jan Beulich
2016-01-07 15:47               ` Jan Beulich
2016-01-07 15:30             ` Ian Campbell
2016-01-07 15:51               ` Jan Beulich

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=5674410F.3080505@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=ian.campbell@citrix.com \
    --cc=jonathan.creekmore@gmail.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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.