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

Re: [PATCH 1/4] ARM/div: Drop __div64_fls()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Tue, 3 Sep 2024 10:37:04 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=02U6JTTHNpozou3eoV5DxhOmDHrT+Bdj4X9yawzaNB4=; b=jAZ/UG2B/0oxyCYK7Ib61bE4aEdSi4KZQWUTVMaaaCvyFs5Sn2UVfDJes0ZTSI/K9ceWPYp2aVcauLrH1Ky5YihYJsKJJHfapFB+yj+rLkx3lN1SQkY0g2HvM2/DYvkSM3a5wjShNBvZJWDtCFFC21NBw7LHI97Udn6kWF6QoN02RbxeXyuLamzUhhV6mVBTTRVZiAg7qAZh9s3xq00IWP/fc0aOmIOeDxdS4/VOFPkbPxm+ZzW6AgabGJMbQ77XUKBYubCdnfEpcqhRsJMF9kTWFd04wVx2D9LxpIflhNjetmmj8oPrJ04K7oOF57gQgPqIrsS0oCuySgVSh7qNfw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tWjMM3SogfTbuEUXNQJNCO1KTiI6XW5M9CX0aSSpgzFCN6VD/Dvu638Q2LqYWZ1Qa3vrkPDV2ZYeQd5l0u9Ra4wK9D8ICXPgNAFCAHVSZDAZxfiDHn0+2yEXsloxeTg4UYfx+VaQLjk8JWC4OLIgyHn8Gwy4JOQ8TqUq/+FOs0Jj3zilh7ZEU/bJjwimEkuDHeeXIyEx/QfRO+LGxA4BKykMG5nBG/biwsBOdPd3bTbJWPwT+MlLuUZVeo37JKYClNnnUwOv3lRVZ7w/YyRA/lVK6MbdtCw1I5Gy4AUFT2Q+9rFCoQdUsQQMTPI1hgoHY7BvRnG40DOQ4ztrhz/lgg==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "Bertrand Marquis" <bertrand.marquis@xxxxxxx>
  • Delivery-date: Tue, 03 Sep 2024 08:37:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 02/09/2024 12:03, Andrew Cooper wrote:
> 
> 
> Following the improvements to Xen's bitops, fls() does constant propagation in
> all cases.  Use it, and drop the local opencoded helper.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

> ---
> CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> CC: Julien Grall <julien@xxxxxxx>
> CC: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
> CC: Bertrand Marquis <bertrand.marquis@xxxxxxx>
> CC: Michal Orzel <michal.orzel@xxxxxxx>
> 
> ARM32 gets a very minor code generation improvement:
> 
>   xen.git/xen$ ../scripts/bloat-o-meter xen-syms-arm32-{before,after}
>   add/remove: 0/0 grow/shrink: 0/6 up/down: 0/-48 (-48)
>   Function                                     old     new   delta
>   wallclock_time                               288     280      -8
>   printk_start_of_line                         560     552      -8
>   domain_vtimer_init                           472     464      -8
>   do_settime                                   376     368      -8
>   burn_credits                                 760     752      -8
>   __printk_ratelimit                           424     416      -8
> 
> But it's just a couple of operations improvement and no real change in code
> structure.  I expect that the constant propagation being done through
> __builtin_clz(), rather than pure C, is giving the optimiser a bit more
> information to work with.
> 
> This file also has an __GNUC__ < 4 case which seems ripe for removing...
Agree and noted.

~Michal



 


Rackspace

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