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

Re: [PATCH v2] x86: use POPCNT for hweight<N>() when available

  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 22 May 2020 12:19:27 +0200
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Fri, 22 May 2020 10:19:40 +0000
  • Ironport-sdr: HmLuVmKF0041qSAPfbrl73oRNrN5n9et4OeZebTCWbsXxtXsbRxOTSkrCgM3AHw/d+mYMsqtjr UbfH1urKxTmQZTWYt1pJLiMCITidX5iLL4OJ3BGuWDA+I2NgAqbN4IqyMfqkSv/9GUprw6x9fX 9C7kmswsZrjZCgUx6CUnULQUKgcO7tNwaSKLtnEDGDUn/EP2QoJBVR97EHRcSCjPiJ+hg3Cswf ifyD3F7XKG0BjNC6E0xa+Cm09Mn1zsUhzF3X97Z7DKO+lsdoNklf/L/mO0iRlb/YEs8lKtDLPk G8c=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, May 22, 2020 at 11:58:40AM +0200, Jan Beulich wrote:
> On 20.05.2020 19:18, Roger Pau Monné wrote:
> > I also assume that using no_caller_saved_registers when available or
> > else keeping the current behavior is not an acceptable solution? FWIW,
> > from a FreeBSD PoV I would be OK with that, as I don't think there are
> > any supported targets with clang < 5.
> By "current behavior" do you mean what the patch currently
> does (matching my earlier response that I may try going this
> route) or the unpatched upstream tree?

Sorry this wasn't clear. By current I meant what's in the upstream
tree. IMO having both no_caller_saved_registers, the -ffixed-reg stuff
and the current upstream no popcnt implementation is kind of too much

My preference would be to add popcnt support only when
no_caller_saved_registers is supported by the compiler, as I think
that's the cleanest solution. This is purely a performance
optimization, so it doesn't seem that bad to me to request a newish
compiler in order to enable it.




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