Re: [PATCH v2 02/11] mm/hmm: use reference counting for HMM struct v2

From: John Hubbard
Date: Thu Mar 28 2019 - 22:11:40 EST


On 3/28/19 6:50 PM, Jerome Glisse wrote:
[...]
>>>
>>> The hmm_put() is just releasing the reference on the hmm struct.
>>>
>>> Here i feel i am getting contradicting requirement from different people.
>>> I don't think there is a way to please everyone here.
>>>
>>
>> That's not a true conflict: you're comparing your actual implementation
>> to Ira's request, rather than comparing my request to Ira's request.
>>
>> I think there's a way forward. Ira and I are actually both asking for the
>> same thing:
>>
>> a) clear, concise get/put routines
>>
>> b) avoiding odd side effects in functions that have one name, but do
>> additional surprising things.
>
> Please show me code because i do not see any other way to do it then
> how i did.
>

Sure, I'll take a run at it. I've driven you crazy enough with the naming
today, it's time to back it up with actual code. :)

I hope this is not one of those "we must also change Nouveau in N+M steps"
situations, though. I'm starting to despair about reviewing code that
basically can't be changed...

thanks,
--
John Hubbard
NVIDIA