On Thu, 2019-07-25 at 13:42 -0400, Nitesh Narayan Lal wrote:
> On 7/24/19 1:05 PM, Alexander Duyck wrote:
> > From: Alexander Duyck <alexander.h.du...@linux.intel.com>
> > 
> > 

<snip>

> > @@ -924,12 +956,24 @@ static int virtballoon_probe(struct virtio_device 
> > *vdev)
> >             if (err)
> >                     goto out_del_balloon_wq;
> >     }
> > +
> > +   vb->ph_dev_info.react = virtballoon_page_hinting_react;
> > +   vb->ph_dev_info.capacity = VIRTIO_BALLOON_ARRAY_HINTS_MAX;
> > +   if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_HINTING)) {
> > +           err = page_hinting_startup(&vb->ph_dev_info);
> > +           if (err)
> > +                   goto out_unregister_shrinker;
> > +   }
> Any reason why you have kept vb->ph_dev_info.react & vb->ph_dev_info.capacity
> initialization outside the feature check?

I just had them on the outside because it didn't really matter if I
initialized them or not if the feature was not present. So I just
defaulted to initializing them in all cases.

Since I will be updating capacity to be based on the size of the hinting
queue in the next patch set I will move capacity initialization inside of
the check.

Reply via email to