[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: MP-safe pppoe(4)
On 2016/12/01 18:40, Kengo NAKAHARA wrote:
> My co-worker Shoichi YAMAGUCHI and I implement pppoe(4) MP-safe.
> # Nearly all parts is written by him, thanks :)
> Here is the patch.
> At first, we try to use pserialize/psref, however pppoe would update
> softc members in softint context of control packet processing. As their
> update is higher priority than data packet, the control packet
> processing cannot be modified to deferred processing such as
> Furthermore, some packet processing path, that is, sppp_input() and
> sppp_outout() write their softc members for keepalive.
> So, we give up to use pserialize/psref...
> Therefore, we use rwlock and mutex, the lock design of above patch
> is below
> + for if_pppoe.c
> - "pppoe_softc_list_lock" rwlock
> => global lock for pppoe softc list
> - "softc->sc_session_lock" rwlock
> => per softc lock for some members which is frequently read by
> data packet processing path
> - "softc->sc_lock" mutex
> => per softc lock for other members which is read/written by
> control packet processing and ioctl
> + for if_spppsubr.c
> - "spppq_lock" mutex
> => global lock for sppp keep alive list
> - "sppp->pp_lock" mutex
> => per struct sppp mutex for whole sppp include write-mostly
> Could you comment this patch?
I rebase and commit it.
Internet Initiative Japan Inc.
Device Engineering Section,
IoT Platform Development Department,
Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>
Main Index |
Thread Index |