On Wed, May 04, 2022 at 04:26:18PM +0200, Alexander Bluhm wrote:
> On Wed, May 04, 2022 at 02:21:11PM +0200, Alexandr Nedvedicky wrote:
> > I'm not sure flipping a flag is a right change. In general we don't want
> > to hold NET_LOCK()/PF_LOCK() while waiting for memory.
>
> - We must not wait for memory when in the packet processing hot path.
> Drop the packet instead.
>
> - We should not wait for memory when holding pf lock. Then we can
> replace rw lock with a mutex or something else later.
>
> - Waiting for memory with net lock is unavoidable. We have to
> wait when coming from system call. Doing preallocation may be
> possible in some cases but code may get too complicated elsewhere.
>
> If getting the allocation out of the locks is doable here, it could
> be the best solution.
I think it's doable. I'll try to finish the for tables and start sending
diffs hopefully next week.
regards
sashan