Re: struct ifnet and ifaddr handling [was: Re: Making global variables of if.c MPSAFE]

2014-11-14 Thread Taylor R Campbell
Date: Fri, 14 Nov 2014 13:59:10 +0900 From: Ryota Ozaki Related to mutex I have two questions: - If we really want to alloc an object with holding a mutex, what should we do? use pool(9)? or we should avoid such a situation? Preallocate before you acquire the lock. See the kmem

Re: struct ifnet and ifaddr handling [was: Re: Making global variables of if.c MPSAFE]

2014-11-14 Thread Ryota Ozaki
On Fri, Nov 14, 2014 at 4:42 PM, Taylor R Campbell wrote: >Date: Fri, 14 Nov 2014 13:59:10 +0900 >From: Ryota Ozaki > >Related to mutex I have two questions: >- If we really want to alloc an object with holding a mutex, > what should we do? use pool(9)? or we should avoid suc

Re: struct ifnet and ifaddr handling [was: Re: Making global variables of if.c MPSAFE]

2014-11-14 Thread Ryota Ozaki
>> Otherwise (and even so), someone is likely to remove the kernel lock >> without understanding the constraints and wind up with an interrupt >> handler on cpu0 munging the ifnet list at the same time as a thread on >> cpu1. >> >>Anyway we should get rid of calling m_reclaim in hardware interr