From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-186.mta1.migadu.com (out-186.mta1.migadu.com [95.215.58.186]) (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 E32D9137C52 for ; Wed, 13 Aug 2025 01:49:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755049785; cv=none; b=DtszPS6pFWo4AGgNbDoK6+gXpU6DmtfVBNzmjSHM8RUlwOej2Y2EDCzapwNwZ1YxDdgDTFGvnYYyv5JnMSU28ylQU8M4O8LMWoPj9TGJLeUC2D089PGIia+SkDJDTEJO6rVBWkWKSl3ZM0O+qGoFaPrAEFMDZiR9WCk9MZXI8sk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755049785; c=relaxed/simple; bh=y8eBs0fHI7CmVwCx02H3JMhe4sR4fjcsdxnZfKRbvCM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=tsuy15G3W0yxKSyQwUQjase4qlxlM7neYQe7d1gzgCw6MTOLHS2HFMWYHjCno+BsCWHQeF9d3WqzqZWe7hxP3xQjv/N+Tb1w7CN6m6zkbKjpS34sD8G3LdMJvAcdEjEIalrpyjgrEL6gaEOOIQNNVwk/a7wJrZJDP2unJSCXoWQ= 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=dF5AdvKR; arc=none smtp.client-ip=95.215.58.186 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="dF5AdvKR" 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=1755049780; 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=dF5AdvKR2ca/0Id6PcyQBrt5ubWxMZGHTzaPtosUH84mRPw/rz0ZtN0RXNgT+qna999apu RBTv6rLYEKBdLApJ1ypjDqATumzw0aXP/UyfSY5X9mPvS8YQph8ScVbB7RyO0vyJbiQD2t oCWzMrZeb/bNRLTfrs79xT2u9H5kJAs= 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:28 -0700 Message-ID: <87ms84q9cn.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