[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC] rangeset: mark a few functions pure
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Wed, 28 Sep 2022 16:27:31 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=4yXpmNzie8LeUEtzFuMno5KC9eU6z0SNVvIdOvNWQ64=; b=GtX4FTyqem+Rl3AW0ku1/KizG15wtYVpj6b+FP7OWcqPBe1Z33WphzZmE5Rey78D9XKNlnWgBUOlGbsGJO5ZryGOrsE+upwhlTUkEJBJUaRZ6zzewNqAuCpbpcSbKfz5LGR8HyUA/xwvcaaUCOi3wVirxK9l29eUXxLyEY8twsFJAybUhf8NYLJNDpC0UQmyapM+vh+gnsv6swJKHhhj9z1uqgrrcGTNPBvF3b66OkeSy5h6wKyXDJiKE5tEPQ1KgrGZBYBkVwUwZpCsX4sQB5VxU6CakAB2cgnmwcjuAvKadZ128yXTsOrdMwsNFOA87WPcI+LVrSV2vopXucWPEQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZjQwXbgShy9SXyMgk+kNv7yYzo3I7AUd8O4fAYPhzay5r2xp785XQCgeQq1YNv16k5+3YsKyPTCjbLBUfnNFmh0nxObJ1TnoaN0jH3o7QCK16xrZCVJub3h6WdCNiQMoI5UduDzerB5aKdJ2itGD8sUDTybRerCt7X/CxWG+0iwB5l2OR1n3ZS46FJSS9XrKNw947nTlBONNoTb5cGhry4GT5cq6RoiQWvKlA++a9tbnx/hM9MMXCcOk2T/IXJVAhliWiVhXwKD6ioL2bzmzbSxy924EtjExsboujBguTUR9PzUKu1xYCt8IZJu2dyW7WZpF0GjMvZ/91sCQFnJ9AA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Wed, 28 Sep 2022 14:27:46 +0000
- Ironport-data: A9a23:pxagTK2qOeT2scFI8/bDix16xaGdEXBdZcB5hTgEjSJ0oekyFxJjW3jMTdpVwLd93lHzZH0GQp7dh363NtgY4IeonlOzSydJqkFIdFgxvvF6P27LQMdqxhOGCWDKLHs+PL+iGdXUOwyzgpN9M1dKpV0qOwrp4+92L95NYKqU3o7LFLiOAhM16n+vet/sykZphI5LxjMAUSkF8wd3CjK6+l8aR1/gF4ogsHjoR4cswgkxh4Ngo8tQH4CcDBg59I7b/OS3hU1X0k+48bJXIeIzeKNGXUr+nshSwtCULpDB80eNE4iM/oLf893ylNAQF07BLE6cbDpvzJWdLmNJ5UorqQWEkvHvGQIZxTQuFh5Geh3qPZ6zY531GV2QSx9UCGQMb80fMLrtmFwqOj7OiEyT4Gwbz68Mtt4uXNyijw9YhOeag1SP2snBUwHSinU/PIYFrHlS+M25TRSCea3gqma/Y7AdRvW02+Zm059WaPCaQgVgqSz0fNgHcbSgDs7qOqfQ/R9YuKuw9Bae7YINczaz0zv34t2i54XTm6YpopjET75ty2EKgFDUp16PrhpiobHXJ+vL15jdKii7/S69matWQlg2FJR42bN6zLBDXwnNk5gWFcOFEODpiAiCJZjQyGe3oXEkt3fowjr0+qJ9cLddXOKuznXyhcRm7V2CPs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tyPDM87oWKY1RQ5TleKOdvWcJjAmOddSTj6RkkefjaaKnUZ0ungZE3//MAwRJpsn4qnw1liTy1K2uyFDzYTfo8GYFceWYZaQ5mAPpgOBmHK8qqlxyScisEcYhtNMqplts4KWZNS+9s7jipeveZ8R0Z6FW290tUsk0E9hI5u/cI67BpWHm5mPX+tXvamxDufezz9CX4lLbcsr+D7KYJKSpIsgRHY/tfY5Cr00ut191kuXHXfRl53/oJAO9HWGVV71bYqe4aeVYjuVlyX2n5MpuZMCQYT0BG1X+Bd3wB7exG5FjjSZYLAOaEMGznbvrHVzzitdQ/FCbRgrYCoRU+j1GkagUmt8PJdtSGhnE77NW2XWy4lw+e4SDKk8rjwb2rO2f7vE3uzmhrFeVBwmHWwVdMN/SEg4usZWhO1WyvqGLCKtvR9CiCjohGKRrqtw7H/US4xtnt5GoTeM3ArLBqWn2/YP5Jo9upgQ/Jjt6C28LzDIb78+oKpInckyI/zMeVMJeaelWMICvfM/PDI8Akc/hDRt+L8m9THWBLYSSKSVtH4f4o97Ua1kKbudjxFT4BpNKycBshT3x9N/Mn+ZmHHkcKPexy39elbDiqh5eaAIJeLLyF8EnGY6sacscXbUjJL+5drQzBDN2uPviNlJT69Ab/i5u1ElrrZBwLeY+TOtnAbrqvNBxnotpYPpiMiOGbaZQqGhywF+KfcBXf3PbFlIgDix8=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Sep 28, 2022 at 02:12:30PM +0200, Jan Beulich wrote:
> While for some of the functions there's locking involved, the acquiring
> and releasing of a lock doesn't alter program state when comparing
> "before" and "after" the function invocations. Furthermore without
> (further) locking by callers, return values are stale anyway by the time
> they can be evaluated. Hence both CSE and DCE are okay to occur for
> invocations of these functions.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> RFC for the (imo) ambiguous wording in documentation.
What happens if the contents of the rangeset is modified outside of
the scope of the function. Ie: would for example:
while ( !rangeset_is_empty(...) );
Become an infinite loop then, without taking into account that the
rangeset can be externally modified?
It's not clear to me whether the elimination of repeated calls take
into account that the observed variable can be externally modified?
Thanks, Roger.
|