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

Re: [PATCH v2 2/6] xen/sched: create public function for cpupools creation


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Tue, 15 Mar 2022 17:50:20 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=O7y2d/oRAkaL4YdWMZFQJAxitro2bMzVLalVsVklBPI=; b=Ptg01z9d0GRPtpeb/0J+yirH4S5nFpHejNLueT+BARK2zSy1MXNgjLytUIxmnTl1Xf/iKTWFYewq26hV1icfhv6W7NiQyayJNL3BtmvQUU7PLNInf3lO4fGz6SwT7FH7hXYYs0V0AzlyhWSuwr/CbQcoBL1Dv0dELUmSNq4ITJu6NzJiB79g43Ghf0tec6SwijxtFS0ZRTvZz2RElmN2kYC2n5rPd4WE00lSV8rdBE1wHMuUNFEBJM8sete4YgdTgGMqQtWNFvkXoNzLAfNP/jx9nq/GNIoRKBq34wDlapIaHRFkvWcMXJYc01QtNvXgGjJBDUvIAV7kBj0B645Szw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dQSUmry2iREd0uQL66JaU1uTfp28BHBl5D3o6ivfgt22JZAsneRauZaSVztHLPMk66bP5WT0yqUSYRCLUCbf0l/wMfHKQdeHtD5K6WdcbZz6jfdBDEUWJ0WneTfHSMZ6ic58elwnKCITbcs6koZguA6dC+Jr1pEYhB6tlCg1cTCyiweJKs6v7DQKr4BI1mx16k2VMRIzcy32z9tWIBGGmIZmOA8aUpofEBlsMEM1dorjibM42kq/3JWUS2dB2UTNM6JbZsPuVozipVHeaVqY3s5qoH9I4ekrpSRlt2OPPFIlQJwW6fCUuHG6XE3N4i/iUYtr2XaDKSlAwPGkWCt8dA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 15 Mar 2022 17:50:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYNKHPindJgoRlsE6X+ucflL5fkqzAv7cAgAABSoA=
  • Thread-topic: [PATCH v2 2/6] xen/sched: create public function for cpupools creation


> On 15 Mar 2022, at 17:45, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx> wrote:
> 
> On 10/03/2022 17:10, Luca Fancellu wrote:
>> diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
>> index 10ea969c7af9..47fc856e0fe0 100644
>> --- a/xen/include/xen/sched.h
>> +++ b/xen/include/xen/sched.h
>> @@ -1145,6 +1145,22 @@ int cpupool_move_domain(struct domain *d, struct 
>> cpupool *c);
>> int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op);
>> unsigned int cpupool_get_id(const struct domain *d);
>> const cpumask_t *cpupool_valid_cpus(const struct cpupool *pool);
>> +
>> +/*
>> + * cpupool_create_pool - Creates a cpupool
>> + * @pool_id: id of the pool to be created
>> + * @sched_id: id of the scheduler to be used for the pool
>> + *
>> + * Creates a cpupool with pool_id id.
>> + * The sched_id parameter identifies the scheduler to be used, if it is
>> + * negative, the default scheduler of Xen will be used.
>> + *
>> + * returns:
>> + *     pointer to the struct cpupool just created, on success
>> + *     NULL, on cpupool creation error
> 
> What makes you say this?  Your new function will fall over a NULL
> pointer before it returns one...

You are right, it’s a leftover from the v1, I will change it and review the 
code that uses it.

Cheers,
Luca

> 
> ~Andrew


 


Rackspace

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