From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-187.mta1.migadu.com (out-187.mta1.migadu.com [95.215.58.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 03891137C52 for ; Wed, 13 Aug 2025 01:50:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755049832; cv=none; b=u6WX9UYfP81H6zOXdAfsMwJDg/bDCaT/J8ZDpalqAR4ZVnGDu3p+mBSttqzjKWwd858OObh/ZWVOl7mU61K9hRlBy0JNs3tUx6M9FQNtiocmy9tmzvWVAoe9/fUTu9vd7DAiEQBAclCAHEzs2ty4LIqn+PlKjiuuc4BaAeiFpw4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755049832; c=relaxed/simple; bh=y8eBs0fHI7CmVwCx02H3JMhe4sR4fjcsdxnZfKRbvCM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=IWIP/F+eubf9ctFYuy8b2aI5CL6EnNTOGfPfPMt1Jhjg7o37EaTip8bdxq9z87pWb83msYUHAjThzTR79ma9OwwDA3r1f9b6p6psM3292lSGIdu9PlpuR9qzVJxjbzoFXc/RTKrbpoTJxHuV1OhwjX99T/2Wmsuz3C3DU9Bw1Gk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=SF1rT0tA; arc=none smtp.client-ip=95.215.58.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="SF1rT0tA" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1755049829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=y8eBs0fHI7CmVwCx02H3JMhe4sR4fjcsdxnZfKRbvCM=; b=SF1rT0tAM6JS0llX/Cu01eukUONtWr3JXh1MlsvRryqzvc/FfamrPE9KmmQ2GbColMhSuS I6wp83nQACLp8cJcVKIMxJwC+2qdTTe51goUYp7nNXjPFs+XhEkthpfgWEnL+wQgornrFK 3hGMiQHpJklYImJ1u1HTtG4dUoIDHEc= From: Roman Gushchin To: Kuniyuki Iwashima Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Neal Cardwell , Paolo Abeni , Willem de Bruijn , Matthieu Baerts , Mat Martineau , Johannes Weiner , Michal Hocko , Shakeel Butt , Andrew Morton , =?utf-8?Q?Michal_Koutn=C3=BD?= , Tejun Heo , Simon Horman , Geliang Tang , Muchun Song , Mina Almasry , Kuniyuki Iwashima , netdev@vger.kernel.org, mptcp@lists.linux.dev, cgroups@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v3 net-next 09/12] net-memcg: Pass struct sock to mem_cgroup_sk_under_memory_pressure(). In-Reply-To: <20250812175848.512446-10-kuniyu@google.com> (Kuniyuki Iwashima's message of "Tue, 12 Aug 2025 17:58:27 +0000") References: <20250812175848.512446-1-kuniyu@google.com> <20250812175848.512446-10-kuniyu@google.com> Date: Tue, 12 Aug 2025 18:49:50 -0700 Message-ID: <87jz38q9c1.fsf@linux.dev> Precedence: bulk X-Mailing-List: cgroups@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Kuniyuki Iwashima writes: > We will store a flag in the lowest bit of sk->sk_memcg. > > Then, we cannot pass the raw pointer to mem_cgroup_under_socket_pressure(). > > Let's pass struct sock to it and rename the function to match other > functions starting with mem_cgroup_sk_. > > Note that the helper is moved to sock.h to use mem_cgroup_from_sk(). > > Signed-off-by: Kuniyuki Iwashima > Reviewed-by: Eric Dumazet Acked-by: Roman Gushchin