[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/5] sched/arinc653: Reorganize function definition order


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • From: Jeff Kubascik <jeff.kubascik@xxxxxxxxxxxxxxx>
  • Date: Fri, 18 Sep 2020 14:04:49 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=dornerworks.com; dmarc=pass action=none header.from=dornerworks.com; dkim=pass header.d=dornerworks.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector5401; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=04K8WvwpTsTT8DZRx/vQbmgtTL2ywarnaPCS/+o1PV8=; b=BeZBtB1WdqT68otNq45/Ztyj/jU6nhvUXU9eAfsjCk7IHtfr9I5vIx0Qwjl6eAZodI9Rl/Yl9dkCgBbXwGAs5mkWRLl282eTHqsfu7AzJe/P5Y3gUxCIAN0sbN0XScINmR33TP2wSxRGjfoGYcHsmixJWVlf4Uig7EJOSPPQJSffX020hbVfUBww6ywgu+EktPDS9CY86CNu69QcZ2f0d+jDYWlGNuchUKZOMdxHGLrJawwCX9iG8gny/LTsOh4C+sDQ/wRRVb18nm0qWHZh8Y0SCDNwTFtc9/YH/mNxUaF2+aeiMPuVUyIzAi15xOGpKNow0EE8kyaeOSPFAxScmw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector5401; d=microsoft.com; cv=none; b=OPD9EmaBvm8E6Hst9mNfoAov17dGh5Qad9NbWTaR9jFtgI5CmjLjcbt70j00ybz/JrXMrPDA2Uws+D11GJB54SxqngIMrsKMm7c2I+6YJuSHqagagiGtGrVFkxgSEnjWCqgiGmKwVc8zwnS9kYmpnRNslo+s3N5mOtj4njdJhO4qLRGLK98/1/jka7TnPOwmxMUIYPlML/kJ87Vo7ZlG2qw61nf+p/OuunYJ3J1XLslWL0z47NVgRECRZXcO2U78TcXj4U9FXJfHClLR8wNfbjoP9fJWs5VDEFJdpqMjyfXoXdJsV6RSOKpIDkny+L1Ci2yrESkIOsMhjmjDSUL7RA==
  • Authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=dornerworks.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxx, Josh Whitehead <josh.whitehead@xxxxxxxxxxxxxxx>, Stewart Hildebrand <stewart.hildebrand@xxxxxxxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>
  • Delivery-date: Fri, 18 Sep 2020 18:04:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 9/17/2020 10:17 AM, Andrew Cooper wrote:
> On 17/09/2020 09:12, Jan Beulich wrote:
>> On 16.09.2020 20:18, Jeff Kubascik wrote:
>>> @@ -517,27 +516,35 @@ static const struct scheduler sched_arinc653_def = {
>>>      .sched_id       = XEN_SCHEDULER_ARINC653,
>>>      .sched_data     = NULL,
>>>
>>> +    .global_init    = NULL,
>>>      .init           = a653sched_init,
>>>      .deinit         = a653sched_deinit,
>>>
>>> -    .free_udata     = a653sched_free_udata,
>>> -    .alloc_udata    = a653sched_alloc_udata,
>>> +    .alloc_pdata    = NULL,
>>> +    .switch_sched   = a653sched_switch_sched,
>>> +    .deinit_pdata   = NULL,
>>> +    .free_pdata     = NULL,
>>>
>>> +    .alloc_domdata  = NULL,
>>> +    .free_domdata   = NULL,
>>> +
>>> +    .alloc_udata    = a653sched_alloc_udata,
>>>      .insert_unit    = NULL,
>>>      .remove_unit    = NULL,
>>> +    .free_udata     = a653sched_free_udata,
>>>
>>>      .sleep          = a653sched_unit_sleep,
>>>      .wake           = a653sched_unit_wake,
>>>      .yield          = NULL,
>>>      .context_saved  = NULL,
>>>
>>> -    .do_schedule    = a653sched_do_schedule,
>>> -
>>>      .pick_resource  = a653sched_pick_resource,
>>> +    .migrate        = NULL,
>>>
>>> -    .switch_sched   = a653sched_switch_sched,
>>> +    .do_schedule    = a653sched_do_schedule,
>>>
>>>      .adjust         = NULL,
>>> +    .adjust_affinity= NULL,
>> Adding all these not really needed NULL initializers looks to rather move
>> this scheduler away from all the others. (Oddly enough all of them
>> explicitly set .sched_data to NULL - for whatever reason.)
> 
> The "= NULL" is totally redundant, because the compiler will do that for
> you.

I agree with this. This originally was intended to lay the groundwork for patch
#5, but looking at it again, was confusing and unnecessary. I'll remove the =
NULL lines.

> The last user of .sched_data was dropped by 9c95227160.  Conceptually,
> it is a layering violation (it prevents different cpupools being
> properly independent), so I'd recommend just dropping the field entirely.

I'll remove .sched_data above.

-Jeff



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.