[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-devel] LwIP SMP Experience
From: |
Joel Cunningham |
Subject: |
Re: [lwip-devel] LwIP SMP Experience |
Date: |
Fri, 24 Mar 2017 10:09:12 -0500 |
> On Mar 24, 2017, at 9:33 AM, Simon Goldschmidt <address@hidden> wrote:
>
> Joel Cunningham wrote:
>> I have a couple products that run LwIP in an SMP environment with
>> CORE_LOCKING enabled. I haven’t done any SMP optimizations yet,
>
> The performance problem I saw was not really only SMP related but could
> prefer high priority connections over low priority (at least for TX, RX is a
> bit trickier).
> You (like the Minix and Hurd services) solved this by having multiple threads
> at socket level but not at pcb level…
>
>> [..] we ran into issue with this because the event_callback in sockets.c
>> calls sys_sem_signal() while the spinlock was held
>
> I'd rather fix this by saying we must not call sys_sem_signal() or
> sys_mbox_post() calls from SYS_ARCH_PROTECTed regions.
> That could possibly be done by protecting the select_sb_list using an
> additional (global) mutex instead of SYS_ARCH_PROTECT.
>
Agreed that’s another approach. I’m fine with that, especially if it was never
intended to perform any sleeping/task switch while inside SYS_ARCH_PROTECT.
I’ll open a task
Joel