From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) (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 5BAA035F185 for ; Mon, 24 Aug 2026 03:35:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787542544; cv=none; b=ZLfT4Ty6nnLQqNLBxUP2gCwXfeaYvu76wF+BqnjxU6F3fKrtdK3q9W6FjL/wEziVPraRivg2PZVfR3uvwrIhHf4m0o7qOS93CwpiIpVN8V2E+xW69CFAqwOyB7hr9eLz8/eBPND0nfBaRyai5el8JSz+E5zoZ8hNmYb7zGVsEE4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787542544; c=relaxed/simple; bh=kbgCodxyQTaxxkxIo0FUrwNH41ZTUr4K/1wkJGxMPuo=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=aMTZdLj7hKPo9925J1VJKNIok6Ry1NTtLAVIrzzEgai/jsGP8gonThNIM7R1t8c+RI4Wau02EwqwgzvzfhiQ35hYssVQYX/3tq6NRjvYyXC5GY9fQ3tblS63xfvWTDGgCF+smYBBcLZ9BZv0u9iBxuIC30W1Gq1sbojREaaFQkA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--wfelipe.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=CQ69D3AW; arc=none smtp.client-ip=209.85.214.197 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=flex--wfelipe.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="CQ69D3AW" Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2cd01a14e81so39270635ad.1 for ; Sun, 23 Aug 2026 20:35:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1787542542; x=1788147342; darn=vger.kernel.org; h=content-transfer-encoding:content-type:cc:to:from:subject :message-id:mime-version:date:from:to:cc:subject:date:message-id :reply-to:content-type; bh=xxIn6wRkBnBvygNlVhjjksdALrlKyZQyyugm0lI7tMA=; b=CQ69D3AWW6HqoCoWr3QXKYEYidW/JhwFcL7aijHB6MaYJBvM4ydWchC5XvVTtvLJtk ydbgSD7iiuuJH0/8Jx6RPdFv5E2PPc0/yYRyIO2vYDLIkcfKjj/eQJIiYoBMV+wE/0tc 6qrkqLOOE4TkTa4pk4+pPtN1Z+FpUkMiCjrNugQeVUA6d/Ka3/EJlAE9pUZGG0JlrM0n y6QedXrP/dsLG13EqnrBHTud82jhfECtQL4ImklBsU+HwKD968Pl2Oaf1EAPqm7pnkNX 8iM34ixZ7f9o5y2UXjRDCAUMB4UPxKSt8+LsbVNwuCgJY9ZJw1/gIQbePQKn4uBjy0nD 95EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787542542; x=1788147342; h=content-transfer-encoding:content-type:cc:to:from:subject :message-id:mime-version:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=xxIn6wRkBnBvygNlVhjjksdALrlKyZQyyugm0lI7tMA=; b=pYPn+XbdxAXHjURWBIdq2kjWhXwFqaHTAu/NO+f+5e+2t2ybD1yf2QGoQaRpq22HFr 2f5AZ2imq/gsIn5dd0WA6ycHU+cNWEN25DBk+A7Mf0QVRkmUVB0ypEmnURw8b1UQYtQ4 52p9uiw9NFTjK1yuBx6y/kk8ZKmnCcJcPJoMmGzM6p/6pbCHaHQH3l4O4pJVwD80Aq3F +x2qDLkit5rcjPKCc+4kDjYmtxOa6Kmn3nNSbMKpYdJBM0ai2XMH6AawRbQUfHQSoLgB r0Adsb0PNucsteCmQPBiW/n0pM2OKMLsM+s7HFukg7hvhy9tSIZ2QzPhFk74BmRyDFtL 1wSg== X-Forwarded-Encrypted: i=1; AHgh+RqMw1I7lwbwq1tfrlpKXOrgsAc0HNrqvxoOmRgM79E1M2n75XW5MY+0ewhUgtvhNBoQwizy4GRG0C4co9c=@vger.kernel.org X-Gm-Message-State: AFuF++nmckg/a4DJxs2oVpGe/7yuWl5UlQ8JtmgmQjIOaUMZsZ55RJsp XdHVdaC3jCA34zhzI/Zj5wOCoanGjChx0tpaNQfoMFSxWie/QCTa9W41YGNFDjQzBoD7TWPLsWD HbHWSloUTPQ== X-Received: from pldc11.prod.google.com ([2002:a17:902:d98b:b0:2ca:c3ac:bb34]) (user=wfelipe job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:f686:b0:2d0:cc92:f7af with SMTP id d9443c01a7336-2d670c96265mr233860275ad.9.1787542542407; Sun, 23 Aug 2026 20:35:42 -0700 (PDT) Date: Mon, 24 Aug 2026 03:33:56 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.55.0.766.g2966f0265a-goog Message-ID: <20260824033533.2147900-1-wfelipe@google.com> Subject: [PATCH v2 0/2] selftests/cgroup: fixes for test_zswap on single core VM From: Wilson Felipe Pereira To: Andrew Morton , Johannes Weiner , Yosry Ahmed , Nhat Pham , Chengming Zhou , Tejun Heo , "=?UTF-8?q?Michal=20Koutn=C3=BD?=" , Shuah Khan Cc: linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Wilson Felipe Pereira Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable This series fixes two test failures in test_zswap observed when running on a single-core VM (-smp 1) with 4GB of RAM. Patch 1 addresses a race condition in test_zswap_writeback() where waitpid() returns before the exiting child process is switched away by the kernel, causing an immediate write of "+memory" to cgroup.subtree_control to fail with -EBUSY. We fix this by waiting for cgroup.events to report "populated 0". Patch 2 fixes an implicit unsigned conversion bug in test_no_kmem_bypass() where small negative timing differences between debugfs stored_pages and cgroup zswapped bytes caused the comparison to falsely fail due to unsigned promotion. v1 -> v2: - Patch 1: Replace EBUSY retry loop with cg_read_strcmp_wait() waiting for cgroup.events "populated 0" (Michal Koutn=C3=BD). - Patch 1: Clarify task lifecycle in commit description (Yosry Ahmed). - Patch 2: Remove abs() and declare delta/zswapped as signed longs with a signed threshold comparison (Michal Koutn=C3=BD). - Patch 2: Add Fixes tag (Michal Koutn=C3=BD). v1: https://lore.kernel.org/all/20260804042053.56940-1-wfelipe@google.com/ Wilson Felipe Pereira (2): selftests/cgroup: test_zswap: wait for cgroup to unpopulate in test_zswap_writeback selftests/cgroup: test_zswap: fix implicit unsigned promotion bug in test_no_kmem_bypass tools/testing/selftests/cgroup/test_zswap.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) --=20 2.55.0.766.g2966f0265a-goog