[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241125171705.46e64cef@p-imbrenda>
Date: Mon, 25 Nov 2024 17:17:05 +0100
From: Claudio Imbrenda <imbrenda@...ux.ibm.com>
To: Heiko Carstens <hca@...ux.ibm.com>
Cc: Christian Borntraeger <borntraeger@...ux.ibm.com>,
Janosch Frank
<frankja@...ux.ibm.com>,
David Hildenbrand <david@...hat.com>, kvm@...r.kernel.org,
linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] KVM: s390: Increase size of union sca_utility to
four bytes
On Mon, 25 Nov 2024 14:40:22 +0100
Heiko Carstens <hca@...ux.ibm.com> wrote:
> On Mon, Nov 25, 2024 at 01:20:42PM +0100, Claudio Imbrenda wrote:
> > On Mon, 25 Nov 2024 12:50:39 +0100
> > Heiko Carstens <hca@...ux.ibm.com> wrote:
> >
> > > kvm_s390_update_topology_change_report() modifies a single bit within
> > > sca_utility using cmpxchg(). Given that the size of the sca_utility union
> > > is two bytes this generates very inefficient code. Change the size to four
> > > bytes, so better code can be generated.
> > >
> > > Even though the size of sca_utility doesn't reflect architecture anymore
> > > this seems to be the easiest and most pragmatic approach to avoid
> > > inefficient code.
> >
> > wouldn't an atomic bit_op be better in that case?
>
> I had that, but decided against it, since the generated code isn't shorter.
> And it would require and unsigned long type within the union, or a cast,
> which I also both disliked.
fair enough
Acked-by: Claudio Imbrenda <imbrenda@...ux.ibm.com>
Powered by blists - more mailing lists