Re: [PATCH 1/8] ns: Add common refcount into ns_common add use it as counter for net_ns
From: Eric W. Biederman
Date: Tue Aug 04 2020 - 09:55:58 EST
Kirill Tkhai <ktkhai@xxxxxxxxxxxxx> writes:
> On 04.08.2020 15:21, Eric W. Biederman wrote:
>> Kirill Tkhai <ktkhai@xxxxxxxxxxxxx> writes:
>>
>>> Currently, every type of namespaces has its own counter,
>>> which is stored in ns-specific part. Say, @net has
>>> struct net::count, @pid has struct pid_namespace::kref, etc.
>>>
>>> This patchset introduces unified counter for all types
>>> of namespaces, and converts net namespace to use it first.
>>
>> And the other refcounts on struct net?
>>
>> How do they play into what you are trying to do?
>
> I just don't understand you. Different refcounters are related to different
> problems, they are introduced to solve. This patchset changes only one refcounter,
> and it does not touch other of them. What do you want to know about others?
>
Why net::count not net::passive? What problem are you trying to solve?
They both are reference counts on the network namespace.
I don't understand what you are trying to do, other than take a bunch of
things that look similar and squash them all together.
What semantics does this magical common reference count have?
Why is it better for the count to live in ns_common rather than it
it's own dedicated field of struct net?
Given that decrementing still requires code per namespace to handle
the count going to zero. How does this benefit anyone?
Has the effect of cache line placement of the move of the reference
count been considered?
All I see in the patch in question is switching a location that the
count lives. Which does not seem useful to me.
I am not fundamentally oppossed but I don't see the point. At this
point it looks like you are making things harder to maintain by making
things common that are merely similar.
Eric