Re: [Patch bpf-next v6 04/12] skmsg: avoid lock_sock() in sk_psock_backlog()

2021-03-26 Thread Cong Wang
On Thu, Mar 25, 2021 at 7:10 PM John Fastabend wrote: > Hi Cong, > > I'm trying to understand if the workqueue logic will somehow prevent the > following, > > CPU0 CPU1 > > work dequeue > sk_psock_backlog() > ... do backlog > ... also maybe sleep > >

RE: [Patch bpf-next v6 04/12] skmsg: avoid lock_sock() in sk_psock_backlog()

2021-03-25 Thread John Fastabend
Cong Wang wrote: > From: Cong Wang > > We do not have to lock the sock to avoid losing sk_socket, > instead we can purge all the ingress queues when we close > the socket. Sending or receiving packets after orphaning > socket makes no sense. > > We do purge these queues when psock refcnt reaches