On Wed, Sep 05, 2012 at 06:40:26PM +0900, Takuya Yoshikawa wrote:
> On Wed, 5 Sep 2012 12:26:49 +0300
> "Michael S. Tsirkin" wrote:
>
> > It's not guaranteed if another thread can modify the bitmap.
> > Is this the case here? If yes we need at least ACCESS_ONCE.
>
> In this patch, using the wrap
On Wed, 5 Sep 2012 12:26:49 +0300
"Michael S. Tsirkin" wrote:
> It's not guaranteed if another thread can modify the bitmap.
> Is this the case here? If yes we need at least ACCESS_ONCE.
In this patch, using the wrapper function to read out a register
value forces compilers not to do bad things.
On Wed, Sep 05, 2012 at 05:30:31PM +0900, Takuya Yoshikawa wrote:
> On Thu, 30 Aug 2012 19:49:23 +0300
> "Michael S. Tsirkin" wrote:
>
> > On Fri, Aug 31, 2012 at 01:09:56AM +0900, Takuya Yoshikawa wrote:
> > > On Thu, 30 Aug 2012 16:21:31 +0300
> > > "Michael S. Tsirkin" wrote:
> > >
> > > >
On Thu, 30 Aug 2012 19:49:23 +0300
"Michael S. Tsirkin" wrote:
> On Fri, Aug 31, 2012 at 01:09:56AM +0900, Takuya Yoshikawa wrote:
> > On Thu, 30 Aug 2012 16:21:31 +0300
> > "Michael S. Tsirkin" wrote:
> >
> > > > +static u32 apic_read_reg(int reg_off, void *bitmap)
> > > > +{
> > > > +
On Fri, Aug 31, 2012 at 01:09:56AM +0900, Takuya Yoshikawa wrote:
> On Thu, 30 Aug 2012 16:21:31 +0300
> "Michael S. Tsirkin" wrote:
>
> > > +static u32 apic_read_reg(int reg_off, void *bitmap)
> > > +{
> > > + return *((u32 *)(bitmap + reg_off));
> > > +}
> > > +
> >
> > Contrast with apic_set
On Thu, 30 Aug 2012 16:21:31 +0300
"Michael S. Tsirkin" wrote:
> > +static u32 apic_read_reg(int reg_off, void *bitmap)
> > +{
> > + return *((u32 *)(bitmap + reg_off));
> > +}
> > +
>
> Contrast with apic_set_reg which gets apic,
> add fact that all callers invoke REG_POS and you will
> see
On Thu, Aug 30, 2012 at 09:30:19PM +0900, Takuya Yoshikawa wrote:
> find_highest_vector() and count_vectors():
> - Instead of using magic values, define and use proper interfaces
>to access registers.
>
> find_highest_vector():
> - Remove likely() which is there only for historical reasons a
find_highest_vector() and count_vectors():
- Instead of using magic values, define and use proper interfaces
to access registers.
find_highest_vector():
- Remove likely() which is there only for historical reasons and not
doing correct branch predictions anymore. Using such heuristics