From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 38EDA38552F for ; Mon, 23 Mar 2026 09:44:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774259078; cv=none; b=FNBowuPtptk6iTeoz1K7hIpGV50LR26crcg90CYDCY5k1O4uKRZFZRe7Uxwr+6R1o6HKPn0ZjjCtojkS2nsrbIA172B8vNbjTSeG/3dZX8eRPeNvqHqjiBJC8syWw0HeHlTLnAY5TbhkotHktrWzLcR7sryhRJe6DNy5GLOlwEE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774259078; c=relaxed/simple; bh=XYhbbjpDV0ET9lpzrkJgS6mYpcOgfUEU7VTc6kLP4UA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dfg1qtM35DlEv48MYXhZvlfLcI3TioQaLVfyX9cs43PRSzZnDZNoOQJfKK1G78Z9bJBpXDikcRVALWIn+Rk2fVBtXLsPB/v3kt3ULdraOy4qN8tfTK8tgFYixQgIMlEZpwmjjIoBNPxEYheu0hEls2xccmZu1aQfEs/39jtY8hc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=DuoL+M4r; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=XItrD+fQ; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DuoL+M4r"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="XItrD+fQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774259076; 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=2LcMB5gIX03eono8rt37+6BTZoTufylHEu17I/eh9tE=; b=DuoL+M4rpNnsY485WkmpPP/v4w4M4yYopCGHGIOGHmJ8aoeI0MmM7Dcz//PoltaF1dfELT 0HDOHVfuIEaY2n3xzFCzsBlodCXr910MXE4lfK3f9nXwG4Mzo3oi+iPJexdXW8t9b0MVoc Povb/PZeoFxuF1N6SoOAYe0zezgJIis= Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-33-LaI4cCmIMz2oUWuC4bSd4A-1; Mon, 23 Mar 2026 05:44:34 -0400 X-MC-Unique: LaI4cCmIMz2oUWuC4bSd4A-1 X-Mimecast-MFC-AGG-ID: LaI4cCmIMz2oUWuC4bSd4A_1774259074 Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-8299499d587so2505273b3a.0 for ; Mon, 23 Mar 2026 02:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1774259074; x=1774863874; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2LcMB5gIX03eono8rt37+6BTZoTufylHEu17I/eh9tE=; b=XItrD+fQi9mk1GwedjMMbroiSlta9zd5YGQtcOUEYxTMtFkPVpf332O+QKhqtYw9b2 Qf50Q5zSNx5GXcwa1kW7DstxrXTH9KuH3LRhbrIkkj/3CyB+xLias+Ef98uoPIsSueAg Z5pNjJHgFm7DcZlcCG40zQVELJaAAvt6qgBieKXFcb2MTsLVDVg9nQmR7VAd8XiqfaAN +uul7EweqKFsjhJv9ECo1Sa/ftCn9tt1rIidvKHoGcX1wzUN+087cqXqI/Tk02zr67Y5 OMBbg4qY4Cl7t2atRyGjcBXTLTaPdBL8zXBTAa5FaR1Nb87Dod82I3fgxWvFv27r4fYt zhqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774259074; x=1774863874; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2LcMB5gIX03eono8rt37+6BTZoTufylHEu17I/eh9tE=; b=RzpwcMIOlF7yzUnJ1RTSL3dIRA8KJL6CP1L0I7hwoqTWrMHYpsayOfU2jwEMyE2+PO xO9sNXhvVeIohWIuBD452dTp/jq3qV+gEB/K9a/LjsSArAIkeND1ejaX8a577ykF+KkM Uw2GXRDsURN+VtIqd4YdjFehRz4hWNKpHGcHhD2sxfPBw95OHbPJE5oPQlNZWBG8UybI +JoV+OBtC6Q2tpPbfW2Oi2ZRZoIXwE+2yPaN+fpvM6c0jO5xBEnsYp2cYGOCWZw8ylYW Spc97WCQ6eZk1IP4SWxPOmLZUmtTn+l13VBH5vEFHuXKzpOw517iCP9lcH2b5GQxP+0h 2K8g== X-Forwarded-Encrypted: i=1; AJvYcCXtYO10GujAjMSSYhsjuYx1BwJ39IBgq/tMsqu+kv+bixQtnAFtZ+Iwf7NjaKXcXz206RoCZSUdssNTDRE=@vger.kernel.org X-Gm-Message-State: AOJu0Yw/SO1zhE2r24MDyAZOb8hhrqdciCDytPW5x7ycYVf6DAutJXbp qBPtVx4X/InxdlTmyZOl8hk4HTPtmUe+DdfOuP+Uhv467n+Q66+hpapgZRhl4LzgpIRiX6+T/uf suptHPaOs8CuokqJFVzF+ajH6UInEC6uAZtSXrSgAFHF3A7ItzyTGziD9FYP0tAptAQ== X-Gm-Gg: ATEYQzwI78ve1U+FG5w7b7rPp4PK6aX1K9L8742j70qBYdOB3Ouiddk0h27TlGwAG6k GjbSI8KfRU050WYxCP6b2lKehgK5OEzW0xTNs3GqXc+VlBF6nToj6HLVQBfiH7S4NJtKn1MQBXD LkFVHkUbCY++MTRqZEjhKTvhfVRB8bLGuDzzdiNS7zCVxLxM0eLqsUmvZtvh3bqFO8jumO5tz8x emtL6SucIoxwcoAqSKTQIjgnkAcL61h7SoHKGgMSz/w8bATIIexqnlUey7gai6/KRrNHoi1qx3C zYcR4YSI54o+8pGBYiZQhON63xyIi0FemNijUJwVjqjXzqUeTgBlQhk/WIsMVik5cOSwfLCHnTR SMukRsx5Z2BZVzh2vBA== X-Received: by 2002:a05:6a00:12e2:b0:82a:7dfd:9757 with SMTP id d2e1a72fcca58-82a8c2525d6mr10198874b3a.4.1774259073587; Mon, 23 Mar 2026 02:44:33 -0700 (PDT) X-Received: by 2002:a05:6a00:12e2:b0:82a:7dfd:9757 with SMTP id d2e1a72fcca58-82a8c2525d6mr10198855b3a.4.1774259073192; Mon, 23 Mar 2026 02:44:33 -0700 (PDT) Received: from redhat.com ([209.132.188.88]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82b0409c681sm10471814b3a.37.2026.03.23.02.44.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2026 02:44:32 -0700 (PDT) Date: Mon, 23 Mar 2026 17:44:29 +0800 From: Li Wang To: Waiman Long Cc: Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Andrew Morton , Tejun Heo , Michal =?utf-8?Q?Koutn=C3=BD?= , Shuah Khan , Mike Rapoport , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, Sean Christopherson , James Houghton , Sebastian Chlad , Guopeng Zhang , Li Wang Subject: Re: [PATCH v2 7/7] selftests: memcg: Treat failure for zeroing sock in test_memcg_sock as XFAIL Message-ID: References: <20260320204241.1613861-1-longman@redhat.com> <20260320204241.1613861-8-longman@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260320204241.1613861-8-longman@redhat.com> On Fri, Mar 20, 2026 at 04:42:41PM -0400, Waiman Long wrote: > Although there is supposed to be a periodic and asynchronous flush of > stats every 2 seconds, the actual time lag between succesive runs can > actually vary quite a bit. In fact, I have seen time lag of up to 10s > of seconds in some cases. > > At the end of test_memcg_sock, it waits up to 3 seconds for the > "sock" attribute of memory.stat to go back down to 0. Obviously it > may occasionally fail especially when the kernel has large page size > (e.g. 64k). Treat this failure as an expected failure (XFAIL) to > distinguish it from the other failure cases. > > Signed-off-by: Waiman Long > --- > tools/testing/selftests/cgroup/test_memcontrol.c | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/cgroup/test_memcontrol.c b/tools/testing/selftests/cgroup/test_memcontrol.c > index 5336be5ed2f5..af3e8fe4e50e 100644 > --- a/tools/testing/selftests/cgroup/test_memcontrol.c > +++ b/tools/testing/selftests/cgroup/test_memcontrol.c > @@ -1486,12 +1486,21 @@ static int test_memcg_sock(const char *root) > * Poll memory.stat for up to 3 seconds (~FLUSH_TIME plus some > * scheduling slack) and require that the "sock " counter > * eventually drops to zero. > + * > + * The actual run-to-run elapse time between consecutive run > + * of asynchronous memcg rstat flush may varies quite a bit. > + * So the 3 seconds wait time may not be enough for the "sock" > + * counter to go down to 0. Treat it as a XFAIL instead of > + * a FAIL. > */ > sock_post = cg_read_key_long_poll(memcg, "memory.stat", "sock ", 0, > MEMCG_SOCKSTAT_WAIT_RETRIES, > DEFAULT_WAIT_INTERVAL_US); > - if (sock_post) > + if (sock_post) { > + if (sock_post > 0) > + ret = KSFT_XFAIL; XFAIL means "expected failure" and is intended for known kernel bugs or unsupported features. A timing issue where the test simply doesn't wait long enough probably not an expected failure, it's a test that needs a longer timeout. I'm wondering can we just enlarge the MEMCG_SOCKSTAT_WAIT_RETRIES value? e.g. from 30 to 150 -- Regards, Li Wang