From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) (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 770011FF1B9 for ; Wed, 8 Jan 2025 16:18:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736353114; cv=none; b=CJTQzEGxjXJFGmRDz+h1MADofYI3bw2KvPpYrtyys5jDeVfAfEpOHBWcnbWBT/CHjlpaq47b0Dg/vPDdzLKFMPCEOnHZm2TTtm1gcNiGH717lmQTeKcdoGSYAtKP90d8++yjAZMaES9hANhuw2GVkQK8szpXX7HI0NKAFQVM62Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736353114; c=relaxed/simple; bh=l8nciXZdCXWkMHkwYtKNlWzhpUvPgx0ToMN/za6GYRE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=IA46pbH3bIP0jrZo6AwT0VZH2w/p+El46G/aaHpjzYTxx173TBwPvwn3D0pPIwFHGybdfTvYwijA24AQK/phZEUNw8rgGmR8RdHtKZv1SiDw7kz4uc0QxLN5GH8IFFB3i674MD+XQNRpt1XbTXRBPE8NiHtKd2vbMH2/DuKzbEs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=OGA7Pty5; arc=none smtp.client-ip=209.85.219.52 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="OGA7Pty5" Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-6d8f65ef5abso142562586d6.3 for ; Wed, 08 Jan 2025 08:18:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1736353111; x=1736957911; 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=l8nciXZdCXWkMHkwYtKNlWzhpUvPgx0ToMN/za6GYRE=; b=OGA7Pty5qk5KbjQ1YpkFmdVxLtwSeoH5PPtD9LA7HWCdlF4ncNWp4c37nBfSyeEyiD DzXSPoQRXLbLhdWoHpK5xwz1+L4NM6J8LlQ8qdlNQe5AERFVZDXw/AFNlRxj4DYrMCXL l6Le20YySOsbR+wGZgU59b0OkbzjGpG4ELPvCTIgwabR7vUprlBc4cBfCeQly4BS4qXY YtdYKa5Ds+idLlo84mO4HHj0sOLfHjnuMY1tFIGExZ9dPeyHAY9bwTIo04IHhw8DA16E uKyR0QkxGQaotqgP+i6JtXhCITEeevSQaJNGwV7AGQ5RjW5/lWYJ4Qqy1fZFmhSqzN5S u/2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736353111; x=1736957911; 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=l8nciXZdCXWkMHkwYtKNlWzhpUvPgx0ToMN/za6GYRE=; b=Y60tyjtiPPtu56Cq8GDdhz1gqUHbn32HtUAqp6vDVq2XeWqszZP6OuUoxiP0c2LAqx cBNeqpbOJLFKNIlqHytv6vHJ63an4gyTWI8UzYUKvU7CCFya9giK1osHEx49HnvZwg+T bhHHmvP7mSvmRE7ZAuc0HbOfFiC4qq3Ruf/dUBIi95s4lbmzxrdEjIOM67UBAG1NwCBv 6Xul+y6uZY3hvlZ2TW9zCerBCi4+oFKzs0Y6EWKyle7d7iEzEJd4u3EGbMepNIxoWOlv njBIE8Us3QyrBA5lU9JCf1iyX2YKEMRjoH8mQU5xATCzJaPxSU6oEjqkjUl6tUzQAcp+ vcdg== X-Forwarded-Encrypted: i=1; AJvYcCUS7y2NO72rlr1NVgq9lnRr8KfH5ICtoUPfXiYUrBIzATCBxDcxOgQUpLv48c6e6jqwvj3C4LzTcvvs/u8=@vger.kernel.org X-Gm-Message-State: AOJu0YwevltHDj7mIiwk9EIMtDxj74Se3wmiTg6jX4fiVBxW8BzqWx6n /2WlqI2KNJzAEmM83VXMHiSkrnlKO8bXIjsjpBX2XAnbsah9NKl8rK53XopfFh+065PxBtpD59S GlF8g0sgJgVPLFAZLro45OL6GHTMY1J7oOu70 X-Gm-Gg: ASbGnctyDwUpIBNbGx3hs/j6HbgltuPNT0WdLtqypRLZCcccu50bcjEOdEJlXEgmY/c S5b1qvwVQdMfmLk7UJRN0doi4VUZuy+X3j/w= X-Google-Smtp-Source: AGHT+IG6TTmlND8nxCYVI9A3hNW0ShEnYrGsKYvA2J0EtQ0zHWAy66bALQi35JzUxDBvIbCjB1whsbOxtnNoUgNtoKU= X-Received: by 2002:a05:6214:458e:b0:6d8:8b9d:1502 with SMTP id 6a1803df08f44-6df9b2ddacamr55646176d6.30.1736353111271; Wed, 08 Jan 2025 08:18:31 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20250107222236.2715883-1-yosryahmed@google.com> <20250107222236.2715883-2-yosryahmed@google.com> <857acdc4-c4b7-44ea-a67d-2df83ca245ed@linux.dev> In-Reply-To: From: Yosry Ahmed Date: Wed, 8 Jan 2025 08:17:54 -0800 X-Gm-Features: AbW1kvYYIyqw2HhqcgWYVlUmfH9U2gZ9ZkW-Er8K65RxoPEAMwfExHefA843shc Message-ID: Subject: Re: [PATCH v2 2/2] mm: zswap: disable migration while using per-CPU acomp_ctx To: Nhat Pham Cc: Barry Song <21cnbao@gmail.com>, Chengming Zhou , Johannes Weiner , Andrew Morton , Vitaly Wool , Sam Sun , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , "Sridhar, Kanchana P" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 8, 2025 at 7:50=E2=80=AFAM Nhat Pham wrote: > > On Wed, Jan 8, 2025 at 10:36=E2=80=AFPM Yosry Ahmed wrote: > > > > > > Oh, I was not talking about my proposed diff, but the existing logic > > that allocates the requests and buffers in the hotplug callbacks > > instead of just using alloc_percpu() to allocate them once for each > > possible CPU. I was wondering if there are actual setups where this > > matters and a significant amount of memory is being saved. Otherwise > > we should simplify things and just rip out the hotplug callbacks. > > My vote is for ripping the hotplug callbacks (eventually) :) In > addition to the discrepancy in the number of possible and online CPUs, > we also need a relatively smaller memory size for the discrepancy to > matter, no? Systems with hundreds of CPUs (hopefully) should have > hundreds of GBs worth of memory available (if not more). > > Anyhow, we can just go with the diff you sent for now (and for past > kernels). Seems simple enough, and wouldn't get in the way of the > eventual hotplug logic removal (if you decide to pursue it). Yeah I sent that out just now: https://lore.kernel.org/lkml/20250108161529.3193825-1-yosryahmed@google.com= / I will look into sending an RFC to rip out the hotplug callbacks later.