Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp578659rdb; Thu, 21 Dec 2023 20:38:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IFeLFwNzB6la7PjpkNpvidswkw84QygILI9iXB2UHGzOe5AIEtSR+MK/PvQlT+3BhbUX8Gp X-Received: by 2002:a05:6358:9149:b0:174:d511:633f with SMTP id r9-20020a056358914900b00174d511633fmr47893rwr.49.1703219884137; Thu, 21 Dec 2023 20:38:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703219884; cv=none; d=google.com; s=arc-20160816; b=RLaDB4j3T7mf0ywmUuMFxts4yLNJHH5yHU2LAxsHB/jyAoZpGjIcei63fwEuF4XF+3 BUlYncLWvYp2tOVkAMYDMeSXRTNnEwDvaQuz6IaQOJxl21XQaSBimw2UjsfBnR9wU1Ka G0ikCcYw5UPca9dLVCXZjSCEIWukrZDmZwSCQknjuiAUhGYxRGFx4g/8IoCY+dJM8FX3 yNirClWWi9+Sdb8pa+fzRVBiXhOJwva6v84TcCoUg2RiyNs2wNHwI0ZIQVTx4vAl2UCP eJ8/0+/Y+CJcR7r/OhRVXJCUZCYZo34CnEEhnFmWMmP5whq9LFNTfRKufXoyEsxo1qSw 7EiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=cq4h5QboZhQMj+vS/GDQCzDFv690LhM1wOxTfWStork=; fh=IVwam4TQD+CieRxCzATEzN7tJf4hUHURLeC8+Ls0pPc=; b=Uxg99/t7j9DwUqP6ilUXSJnLO5lD0ydGWUtaRVfxFLxFzmmRAW3XyOhqZLg5Uc6Tn4 c7dqu4L6hcoaZa6TW8KY1kasS4CTmTdUghqkrKePYXA4LeNPYAHSbviCgDA6yoV2Q9b8 WUFn31//b2S9uqQRKLDVt0AUAwBjQOQ+/lfH5TUIiK5GqwR+TTPdzlsLBhRHoA2rRUNq uful42pO90aR8AWwZg2ttnOtLWUPGilcbMBO06mRURjBQbn6tMf7eMJlNmn5xPvWvHLa uRS4CqVywzChxeTTtPaN4SVRAhgMZEwiJ03fMDOl1/LtfYkBRfjSAJkeELrYb3GXCQQl rldw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=zLMIO8DW; spf=pass (google.com: domain of linux-kernel+bounces-9319-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9319-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id s10-20020a65644a000000b005b8f24e6526si2648317pgv.234.2023.12.21.20.38.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 20:38:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9319-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=zLMIO8DW; spf=pass (google.com: domain of linux-kernel+bounces-9319-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9319-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B04F3B2545F for ; Fri, 22 Dec 2023 04:36:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F07B2B664; Fri, 22 Dec 2023 04:35:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="zLMIO8DW" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD375B64A for ; Fri, 22 Dec 2023 04:35:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-40d3b2c8517so19565e9.1 for ; Thu, 21 Dec 2023 20:35:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1703219747; x=1703824547; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=cq4h5QboZhQMj+vS/GDQCzDFv690LhM1wOxTfWStork=; b=zLMIO8DWhrVVtCQE74Vg350ik6sWZARg93R7XLHDdE43/sNp2SGHwdAt7UlAfXlMXy I6xV2cTqt+/FDN/5gX8Rlg4gsEjgZKd3we8+orNOXj7+kJXeAUIU6EuW6e55/9sgVYmV PtHHDytUggYsXb3w8jfT79hWB8TC99e1SQ7JYNGei518tXXsuJymzOtXsBNo3Ow9kzd0 4TZDhvTsXdYgsNBB1zB8w8DvTaqSSqUB+a9SKq9wVbwN8xSMlSljUHV7VU7+fdTHgl6h t+Kcpz2+O7Njq0Un5rqXRF93rfbloARj2gTdyR41VJnxJ8ZrjKZ/bQtx8E4JfeZCVqAl 04xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703219747; x=1703824547; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cq4h5QboZhQMj+vS/GDQCzDFv690LhM1wOxTfWStork=; b=c+A9wvtU+s2FeozfhiiOD7s7OqS2SRUjcs/CukxU9hvIrkFMrkEMtt4wMmRcfYSxy2 Z9EvgYNrhuxhsIOGhj1lhIiOTdDYkt4CMPnebzuETYkoES307Yr0zzF4/uMcmH+DZrW4 5PfP/IVDyjt4SDzeVJYIVKMrnVj35rQU5uO9uAT3Ly5ALf299T1fzs5IK5CRWsCP+4A/ UgB185a4oCR89XKCk87Dw7gI6Pwo/xCCT1F8Ny5bQyX5VM1vfryvv8VEaKi0j7U9kDlW pcgpct2o+wY4FYHu8Cl6lKvNeSqWmlBC2OFyriK0dc5g6SZkkVrxYNmjDpCv1vW1Pw9M h7og== X-Gm-Message-State: AOJu0YwWKn2I6OisERLL00sr1sUsc6n+vi/ZUoVQnNaoPPrQP2TrvT8W 3Q0D7920TEwlYMtrgcImV6CoHEJlUTCOwZ5+mWGe9pVoUTF/ X-Received: by 2002:a05:600c:210d:b0:40d:3ab7:86e0 with SMTP id u13-20020a05600c210d00b0040d3ab786e0mr39640wml.3.1703219746675; Thu, 21 Dec 2023 20:35:46 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231222024458.12441-1-henry.hj@antgroup.com> In-Reply-To: <20231222024458.12441-1-henry.hj@antgroup.com> From: Yu Zhao Date: Thu, 21 Dec 2023 21:35:08 -0700 Message-ID: Subject: Re: [RFC v2] mm: Multi-Gen LRU: fix use mm/page_idle/bitmap To: Henry Huang Cc: yuanchu@google.com, akpm@linux-foundation.org, =?UTF-8?B?6LCI6Ym06ZSL?= , linux-kernel@vger.kernel.org, linux-mm@kvack.org, =?UTF-8?B?5pyx6L6JKOiMtuawtCk=?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Dec 21, 2023 at 7:45=E2=80=AFPM Henry Huang = wrote: > > Thanks for replyting. > > On Fri, Dec 22, 2023 at 07:16=E2=80=AFAM Yuanchu Xie wrote: > > How does the shared memory get charged to the cgroups? > > Does it all go to cgroup A or B exclusively, or do some pages get > > charged to each one? > > Some pages get charged to cgroup A, and the other get charged to cgroup B= . Just a side note: We can potentially "fix" this, but it doesn't mean this is a good practice. In fact, I think this is an anti-pattern to memcgs: resources should be preferably isolated between memcgs, or if a resource has to be shared between memcgs, it should be charged in a predetermined way, not randomly to one of the memcgs sharing it.