[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated d
From: |
Jike Song |
Subject: |
Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices |
Date: |
Wed, 02 Nov 2016 21:00:08 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 |
On 11/02/2016 08:41 PM, Kirti Wankhede wrote:
> On 11/2/2016 5:51 PM, Jike Song wrote:
>> On 11/02/2016 12:09 PM, Alexey Kardashevskiy wrote:
>>> Or you could just reference and use @mm as KVM and others do. Or there is
>>> anything else you need from @current than just @mm?
>>>
>>
>> I agree. If @mm is the only thing needed, there is really no reason to
>> refer to the @task :-)
>>
>
> In vfio_lock_acct(), that is for page accounting, if mm->mmap_sem is
> already held then page accounting is deferred, where task structure is
> used to get mm and work is deferred only if mm exist:
> mm = get_task_mm(task);
>
> That is where this module need task structure.
Kirti,
By calling get_task_mm you hold a ref on @mm and save it in iommu,
whenever you want to do something like vfio_lock_acct(), use that mm
(as you said, if mmap_sem not accessible then defer it to a work, but
still @mm is the whole information), and put it after the usage.
I still can't see any reason that the @task have to be saved. It's
always the @mm all the time. Did I miss anything?
--
Thanks,
Jike
- Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices, Kirti Wankhede, 2016/11/01
- Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices, Alexey Kardashevskiy, 2016/11/01
- Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices, Kirti Wankhede, 2016/11/01
- Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices, Alexey Kardashevskiy, 2016/11/02
- Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices, Jike Song, 2016/11/02
- Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices, Kirti Wankhede, 2016/11/02
- Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices,
Jike Song <=
- Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices, Kirti Wankhede, 2016/11/02
- Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices, Jike Song, 2016/11/02
- Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices, Alexey Kardashevskiy, 2016/11/03