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

Re: [Xen-devel] [PATCH v3 08/10] xen/nodemask: Introduce unlocked __nodemask_{set, clear}() helpers


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Wed, 31 Jul 2019 08:41:39 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.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-SenderADCheck; bh=w9r5hv3oq5EGndxVw81OYwPsr5Vao1x5xiBMEIjXA6g=; b=EeqeCCu07Y9UhSYpLjaFNBpZtHAYB9zHpjImh/C66HA/OXji4Kx2593Ld2CwVPrR3rRz9ZEwjKbmXkFBSmVibuOmIJJf9BZ5OF2O8SKoFSVQuHB6sISgU/L+wTjPTJISxC4j4ltlMa+iB4u2exsuAoh2zPhi6JaRN7BRaJWMtcc0AilXKbxGdfMo/MyXrKfJuP6zYP6T4YkM+i3a1ndyzl9lYrQ5FlSOexQ4iyQJh02pD6aWisVlCgBG1qPUCsKMnCGs2ynZgmoKO0aCIAf8oejKqvIL+JNICACgVm0Spc95PyYMvNrC6EmyLaUJ3gWfsCppET4L1pJOh+WUiqfvGw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j+RVUuBT/un5YZZI1yGhPnM6tq9QA6OP+6VZreAHI5puf9m2e2tT1k3KLTWElgZJABTqqAMlX1e7fkLLsCo9CISZlsd8tjrREOHAYGRUUHxTI5ptPzbGLTC3H19aBlqqJcQHfDm6PW3eVIaYvfD+yDtJCJOAg/VeVtQ3YbxrdYHcoDhvuTjlVeztk7rRFdT7BUXEylHgjx4sYO5vXufdh1A/jU0252KH+z7MEZZYZhpCD5TBeXdWhVyn4SbruvQrbnj/6FwSEWGyAvBLK20CcFwKn0J3zfizYInIyA1SX//mpDcAIF33oW8WwsvHjeiCoU/psxha75+smVUF22QzCA==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: StefanoStabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 31 Jul 2019 08:51:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVRgbw7C6GvWJsh0yxbCWlYQa9EqbjBzYAgABqvmOAAPmDgA==
  • Thread-topic: [PATCH v3 08/10] xen/nodemask: Introduce unlocked __nodemask_{set,clear}() helpers

On 30.07.2019 19:48, Andrew Cooper wrote:
> On 30/07/2019 12:26, Jan Beulich wrote:
>> On 29.07.2019 14:12, Andrew Cooper wrote:
>>> --- a/xen/include/xen/nodemask.h
>>> +++ b/xen/include/xen/nodemask.h
>>> @@ -11,7 +11,9 @@
>>>    * The available nodemask operations are:
>>>    *
>>>    * void node_set(node, mask)              turn on bit 'node' in mask
>>> + * void __nodemask_set(node, mask) turn on bit 'node' in mask (unlocked)
>>>    * void node_clear(node, mask)            turn off bit 'node' in mask
>>> + * void __nodemask_clear(node, mask)       turn off bit 'node' in mask 
>>> (unlocked)
>> To be honest I'm unhappy to see you introduce new name space
>> violations. I realize you want to have the node mask interfaces
>> match the CPU mask one as closely as possible, but I think we
>> should diverge here (and eventually make the CPU mask ones
>> follow whatever route we go here). As to naming, since these
>> are static inlines, a single leading underscore may be an
>> option (albeit I'd prefer to avoid this). Another option would
>> be to have double infix underscores (nodemask__set()). Yet
>> another option would be to express the non-atomicity in a
>> verbal way rather than by the number of underscores used. I'm
>> afraid I don't have a good naming suggestion in that case,
>> though.
> 
> I'm really not as concerned with namespace violations as you seem to
> be.  We are not a library having to cooperate with arbitrary others - we
> are a freestanding build with the compiler being the only other source
> of symbols in the namespace.  Our chances of colliding are very low to
> begin with, and fixing conflicts if they arise is trivial.

Trivial or not, such conflicts are problematic for branches in
security only maintenance mode. While we _can_ backport such
patches there, we really _shouldn't_.

> As you note, there is nothing obvious as an alternative.  The double
> infix is a no-go as far as I'm concerned - it's far too subtle in the code.

Well, the single-underscore-prefix variant is at least better
than the double one, even if still not ideal. I'd prefer if
you switched, but I don't mean to stand in the way of this
going in, so
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
even in its current shape.

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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