tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Simplify bridge(4)



On Fri, Feb 12, 2016 at 5:26 PM, Ryota Ozaki <ozaki.ryota%gmail.com@localhost> wrote:
> 2016/02/11 2:36 "Taylor R Campbell" <campbell+netbsd-tech-kern%mumble.net@localhost>:
>>
>>    Date: Wed, 10 Feb 2016 18:56:46 +0900
>>    From: Ryota Ozaki <ozaki-r%netbsd.org@localhost>
>>
>>    Thanks to introducing softint-based if_input,
>>    we can simplify bridge(4).
>>
>> Awesome!  I love patches that have loads more -'s than +'s, and
>> simplify locking schemes, and remove sketchy cpu_intr_p conditionals,
>> and things like that.
>>
>>    Here is a patch:
>>    http://www.netbsd.org/~ozaki-r/simplify-bridge.diff
>>
>> Remove cpu_intr_p from BRIDGE_RT_RENTER/REXIT too?
>
> Definitely I forgot them :-/ Fixed.
>
>>
>> I wonder how much of a difference BRIDGE_MPSAFE really makes on
>> uniprocessor systems.  If this were new code I wouldn't have done any
>> conditional compilation of that.  I can't imagine the performance
>> impact is very high: maybe a few more words of memory are used, but
>> uniprocessor mutex acquisition should be pretty cheap.  Maybe in a
>> future patch we can eliminate all that.
>
> I agree. I'll do that soon.

...not so much soon though, I prepared patches:
  http://www.netbsd.org/~ozaki-r/bridge-psz-list.diff
  http://www.netbsd.org/~ozaki-r/bridge-default-mpsafe.diff

The first one introduces membar to list operations used in bridge
for pserialize, and the other one removes BRIDGE_MPSAFE switch and
make bridge MP-safe by default. The first one should be revisited
once we have the official API of list operations for pserialize.

  ozaki-r


Home | Main Index | Thread Index | Old Index