mbox series

[0/2] Revert and rework on the metadata accelreation

Message ID 20190905122736.19768-1-jasowang@redhat.com (mailing list archive)
Headers show
Series Revert and rework on the metadata accelreation | expand

Message

Jason Wang Sept. 5, 2019, 12:27 p.m. UTC
Hi:

Per request from Michael and Jason, the metadata accelreation is
reverted in this version and rework in next version.

Please review.

Thanks

Jason Wang (2):
  Revert "vhost: access vq metadata through kernel virtual address"
  vhost: re-introducing metadata acceleration through kernel virtual
    address

 drivers/vhost/vhost.c | 202 +++++++++++++++++++++++++-----------------
 drivers/vhost/vhost.h |   8 +-
 2 files changed, 123 insertions(+), 87 deletions(-)

Comments

Jason Gunthorpe Sept. 5, 2019, 1:59 p.m. UTC | #1
On Thu, Sep 05, 2019 at 08:27:34PM +0800, Jason Wang wrote:
> Hi:
> 
> Per request from Michael and Jason, the metadata accelreation is
> reverted in this version and rework in next version.
> 
> Please review.
> 
> Thanks
> 
> Jason Wang (2):
>   Revert "vhost: access vq metadata through kernel virtual address"
>   vhost: re-introducing metadata acceleration through kernel virtual
>     address

There are a bunch of patches in the queue already that will help
vhost, and I a working on one for next cycle that will help alot more
too.

I think you should apply the revert this cycle and rebase the other
patch for next..

Jason
Hillf Danton Sept. 6, 2019, 3:21 a.m. UTC | #2
On Thu,  5 Sep 2019 20:27:36 +0800 From:   Jason Wang <jasowang@redhat.com>
> 
> +static void vhost_set_map_dirty(struct vhost_virtqueue *vq,
> +				struct vhost_map *map, int index)
> +{
> +	struct vhost_uaddr *uaddr = &vq->uaddrs[index];
> +	int i;
> +
> +	if (uaddr->write) {
> +		for (i = 0; i < map->npages; i++)
> +			set_page_dirty(map->pages[i]);
> +	}

Not sure need to set page dirty under page lock.
Jason Wang Sept. 6, 2019, 10:02 a.m. UTC | #3
On 2019/9/5 下午9:59, Jason Gunthorpe wrote:
> On Thu, Sep 05, 2019 at 08:27:34PM +0800, Jason Wang wrote:
>> Hi:
>>
>> Per request from Michael and Jason, the metadata accelreation is
>> reverted in this version and rework in next version.
>>
>> Please review.
>>
>> Thanks
>>
>> Jason Wang (2):
>>    Revert "vhost: access vq metadata through kernel virtual address"
>>    vhost: re-introducing metadata acceleration through kernel virtual
>>      address
> There are a bunch of patches in the queue already that will help
> vhost, and I a working on one for next cycle that will help alot more
> too.


I will check those patches, but if you can give me some pointers or 
keywords it would be much appreciated.


>
> I think you should apply the revert this cycle and rebase the other
> patch for next..
>
> Jason


Yes, the plan is to revert in this release cycle.

Thanks
Jason Wang Sept. 6, 2019, 12:51 p.m. UTC | #4
On 2019/9/6 上午11:21, Hillf Danton wrote:
> On Thu,  5 Sep 2019 20:27:36 +0800 From:   Jason Wang <jasowang@redhat.com>
>> +static void vhost_set_map_dirty(struct vhost_virtqueue *vq,
>> +				struct vhost_map *map, int index)
>> +{
>> +	struct vhost_uaddr *uaddr = &vq->uaddrs[index];
>> +	int i;
>> +
>> +	if (uaddr->write) {
>> +		for (i = 0; i < map->npages; i++)
>> +			set_page_dirty(map->pages[i]);
>> +	}
> Not sure need to set page dirty under page lock.


Just to make sure I understand the issue. Do you mean there's no need 
for set_page_dirty() here? If yes, is there any other function that 
already did this?

Thanks
David Miller Sept. 6, 2019, 1:15 p.m. UTC | #5
From: Jason Wang <jasowang@redhat.com>
Date: Fri, 6 Sep 2019 18:02:35 +0800

> On 2019/9/5 下午9:59, Jason Gunthorpe wrote:
>> I think you should apply the revert this cycle and rebase the other
>> patch for next..
>>
>> Jason
> 
> Yes, the plan is to revert in this release cycle.

Then you should reset patch #1 all by itself targetting 'net'.
Jason Gunthorpe Sept. 7, 2019, 3:03 p.m. UTC | #6
On Fri, Sep 06, 2019 at 06:02:35PM +0800, Jason Wang wrote:
> 
> On 2019/9/5 下午9:59, Jason Gunthorpe wrote:
> > On Thu, Sep 05, 2019 at 08:27:34PM +0800, Jason Wang wrote:
> > > Hi:
> > > 
> > > Per request from Michael and Jason, the metadata accelreation is
> > > reverted in this version and rework in next version.
> > > 
> > > Please review.
> > > 
> > > Thanks
> > > 
> > > Jason Wang (2):
> > >    Revert "vhost: access vq metadata through kernel virtual address"
> > >    vhost: re-introducing metadata acceleration through kernel virtual
> > >      address
> > There are a bunch of patches in the queue already that will help
> > vhost, and I a working on one for next cycle that will help alot more
> > too.
> 
> 
> I will check those patches, but if you can give me some pointers or keywords
> it would be much appreciated.

You can look here:

https://github.com/jgunthorpe/linux/commits/mmu_notifier

The first parts, the get/put are in the hmm tree, and the last part,
the interval tree in the last commit is still a WIP, but it would
remove alot of that code from vhost as well.

Jason
Jason Wang Sept. 9, 2019, 2:29 a.m. UTC | #7
On 2019/9/7 下午11:03, Jason Gunthorpe wrote:
> On Fri, Sep 06, 2019 at 06:02:35PM +0800, Jason Wang wrote:
>> On 2019/9/5 下午9:59, Jason Gunthorpe wrote:
>>> On Thu, Sep 05, 2019 at 08:27:34PM +0800, Jason Wang wrote:
>>>> Hi:
>>>>
>>>> Per request from Michael and Jason, the metadata accelreation is
>>>> reverted in this version and rework in next version.
>>>>
>>>> Please review.
>>>>
>>>> Thanks
>>>>
>>>> Jason Wang (2):
>>>>     Revert "vhost: access vq metadata through kernel virtual address"
>>>>     vhost: re-introducing metadata acceleration through kernel virtual
>>>>       address
>>> There are a bunch of patches in the queue already that will help
>>> vhost, and I a working on one for next cycle that will help alot more
>>> too.
>>
>> I will check those patches, but if you can give me some pointers or keywords
>> it would be much appreciated.
> You can look here:
>
> https://github.com/jgunthorpe/linux/commits/mmu_notifier
>
> The first parts, the get/put are in the hmm tree, and the last part,
> the interval tree in the last commit is still a WIP, but it would
> remove alot of that code from vhost as well.
>
> Jason


Thanks a lot, will have a look at these and come back if I met any issues.
Jason Wang Sept. 9, 2019, 7:18 a.m. UTC | #8
On 2019/9/6 下午9:15, David Miller wrote:
> From: Jason Wang <jasowang@redhat.com>
> Date: Fri, 6 Sep 2019 18:02:35 +0800
>
>> On 2019/9/5 下午9:59, Jason Gunthorpe wrote:
>>> I think you should apply the revert this cycle and rebase the other
>>> patch for next..
>>>
>>> Jason
>> Yes, the plan is to revert in this release cycle.
> Then you should reset patch #1 all by itself targetting 'net'.


Thanks for the reminding. I want the patch to go through Michael's vhost  
tree, that's why I don't put 'net' prefix. For next time, maybe I can  
use "vhost" as a prefix for classification?
Michael S. Tsirkin Sept. 9, 2019, 12:15 p.m. UTC | #9
On Mon, Sep 09, 2019 at 03:18:01PM +0800, Jason Wang wrote:
> 
> On 2019/9/6 下午9:15, David Miller wrote:
> > From: Jason Wang <jasowang@redhat.com>
> > Date: Fri, 6 Sep 2019 18:02:35 +0800
> > 
> > > On 2019/9/5 下午9:59, Jason Gunthorpe wrote:
> > > > I think you should apply the revert this cycle and rebase the other
> > > > patch for next..
> > > > 
> > > > Jason
> > > Yes, the plan is to revert in this release cycle.
> > Then you should reset patch #1 all by itself targetting 'net'.
> 
> 
> Thanks for the reminding. I want the patch to go through Michael's vhost
> tree, that's why I don't put 'net' prefix. For next time, maybe I can use
> "vhost" as a prefix for classification?

That's fine by me.