Re: [dpdk-dev] [PATCH v1 1/1] net/hinic: use mutex replace spin lock
2019-07-09
Thread
Xuanziyang (William, Chip Application Design Logic and Hardware Development Dept IT_Products & Solutions)
> On Wed, 3 Jul 2019 23:35:42 +0800 > Ziyang Xuan wrote: > > > > > +static inline int hinic_mutex_init(pthread_mutex_t *pthreadmutex, > > + const pthread_mutexattr_t *mattr) { > > + int err; > > + > > + err = pthread_mutex_init(pthreadmutex, mattr); > > + i
Re: [dpdk-dev] [PATCH v1 1/1] net/hinic: use mutex replace spin lock
On Wed, 3 Jul 2019 23:35:42 +0800 Ziyang Xuan wrote: > > +static inline int hinic_mutex_init(pthread_mutex_t *pthreadmutex, > + const pthread_mutexattr_t *mattr) > +{ > + int err; > + > + err = pthread_mutex_init(pthreadmutex, mattr); > + if (unli
[dpdk-dev] [PATCH v1 1/1] net/hinic: use mutex replace spin lock
Using spin lock to protect critical resources of sending mgmt messages. This will make high CPU usage when sending mgmt messages frequently. We can use mutex to protect the critical resources to reduce CPU usage while keep functioning properly. Signed-off-by: Ziyang Xuan --- drivers/net/hinic/Ma