From: Shakeel Butt Subject: Re: [PATCH net-next 1/2] net: Keep sk->sk_forward_alloc as a proper size Date: Fri, 12 May 2023 05:06:55 +0000 Message-ID: <20230512050429.22du3gt6rrq6e37a@google.com> References: <20230511211338.oi4xwoueqmntsuna@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1683868017; x=1686460017; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=XEaR3Dr2C8Lj1JCkXuxURcDiSzXLw0/h58n+0eTFpXk=; b=h2TzF1Sm4wgRUFzC402/r2JRCTOK95t1n6LIDMbVzltdZxZ1uErK2N2BwmqWhMnZ2x gDJIw0J+ieOpsXu8IU+C+9duObCvbbPPNDpYL988Bbh3KOzpvj3WlzGRiCq3UgH/fKdN jnwqcwBkrJpjqMeb1gRz3IRnnjZdtsx6i43myLWpj4bq54RB0Rl+g5e4CVUWGbG7PuB/ R7uGjC+ttKIstS0IoBo1yuXXZ2eT57tZ2egiGWEnJXomBv7Vlig+QVZOkQZLtcw28KJY LFbjerQqdZ+UkjE5fPUKDWc2gKvjdO5IUEWfiXlrRyC0zWLen+gMgJyctE6BqErCTj8Y hz+A== In-Reply-To: List-ID: Content-Transfer-Encoding: 7bit To: cathy.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org Cc: Eric Dumazet , Linux MM , Cgroups , Paolo Abeni , davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org, kuba-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Brandeburg-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, Brandeburg Jesse , Srinivas Suresh , Chen Tim C , You Lizhen , eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Fri, May 12, 2023 at 03:23:45AM +0000, Zhang, Cathy wrote: > Remove the invalid mail addr added unintentionally. > Sorry that was my buggy script. [...] > > > > Hi Shakeel, > > > > Run with the temp change you provided, the output shows it comes to > > drain_stock_1(), Here is the call trace: > > > > 8.96% mc-worker [kernel.vmlinux] [k] page_counter_cancel > > | > > --8.95%--page_counter_cancel > > | > > --8.95%--page_counter_uncharge > > drain_stock_1 > > __refill_stock > > refill_stock > > | > > --8.88%--try_charge_memcg > > mem_cgroup_charge_skmem > > | > > --8.87%--__sk_mem_raise_allocated > > __sk_mem_schedule > > | > > |--5.37%--tcp_try_rmem_schedule > > | tcp_data_queue > > | tcp_rcv_established > > | tcp_v4_do_rcv > Thanks a lot. This tells us that one or both of following scenarios are happening: 1. In the softirq recv path, the kernel is processing packets from multiple memcgs. 2. The process running on the CPU belongs to memcg which is different from the memcgs whose packets are being received on that CPU. BTW have you seen this performance issue when you run the client and server on different machines? I am wondering if RFS would be good enough for such scenario and we only need to worry about the same machine case.