From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) (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 161898C1F for ; Mon, 8 Dec 2025 16:47:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765212429; cv=none; b=TxKhdJuyNQ0EzQ+Fg6VBlSeH7tG/c1XzREbG1M6vQpRDJI44o/5NYFWBlFMtG75V1KIRF4VNUDzPg66M07NoZOYoi2rymUwJjJuwUSJGtL1GvKEAaPABxqE7cJHlEe4ICwSa9nvfidAJ8k5MlCuDV4Kt9bsFyqC02DcjIS+IyCI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765212429; c=relaxed/simple; bh=yTq0LKrarkdXvIO0tZ1H6xJySqjSUdTNygcNC164iwY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=pUcB/ohx89rik7zRNQfy0Lyf3VR+uSaB0FAOGKFpOBLKbavGQsG1SAiPI5uf+O20HamrqCXh0A2VtTQq+hKkPkXIRdQHRDmmGnnEwxmrWulCWpTLyEP07jwZq49BnO2k7b90EuNe32wSmKoQMHF428jMskI+gk6Qv7RuAAc4e9A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--ackerleytng.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=AgYLjQN3; arc=none smtp.client-ip=209.85.210.201 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--ackerleytng.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="AgYLjQN3" Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-7b89ee2c1a4so8306840b3a.2 for ; Mon, 08 Dec 2025 08:47:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1765212427; x=1765817227; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Y21xYnymZNnyNmi/HtnuQMz5IMpcwyYducXo/2wK1DU=; b=AgYLjQN3GFcE4C9S0coiJnGB0WfSHAFLD7Y8c0/toiRNfww1BJV+uNuuXuR0bK8UyF h46usM0ERN4tJIlEF3+J2sMEyNy2EtIheR7a6gAFLqNzBER17EfqT/Y/EzDLXQyJEG4V yWHejEXWCbTBfLIzS4SsEIBodRbuXKhCyEkH9wY3dmO0sHgLRBLl3DGytuoRRe/BsurN /OtpaidtiTjAN+Zjk/i0fdA56b1/hPNZAmtsyJB+LH5GEQmKylZPaRnoz4wXmKgwHuqu A3y2EFjwxF96awOv4piyfszi3+rsARnRNOAaX67Qit/Y/GTc7uyGKDPN7ihK8pkwzyzN UITg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765212427; x=1765817227; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Y21xYnymZNnyNmi/HtnuQMz5IMpcwyYducXo/2wK1DU=; b=fjDbbRAcuA578Vx/fUmh/fynfQYwUUgNhO+KgTDL8gyUr5/x90qjrjlsuyD3FrH228 JvnTdwSwxvShF0rUocWKsDBoyrox3qBEl5rvrX9gScZkkcNn7PjRcet62UQv9xsPoTfi 6i8zypZZ9P/YYMVdjMWGy17dlVUIZr7h4W7NU7v5sq76g1cK2PptZIvrtBCxWcFFsLsi nINcEt+cT+U8jqJe/hrLPboNE7Yrq5fa/8q+yd2oOyr2xDcfb6/phZLO5fqi0opJf52X tbP0xpuj9hJafepEs9ZiIyvJnS18GW7R57AY6cuaTIoZRd62BP0UB/BB3nUODI6sJlwY qfTQ== X-Forwarded-Encrypted: i=1; AJvYcCW8QzJDYSWxuvybekltK7kNhu6Q0aLRLeoxGaDXndhKkLyps5RkebIaMqu4JMnZJ3G2rCpjw4c6tg/D8aU=@vger.kernel.org X-Gm-Message-State: AOJu0YzKmqWCrKv5SKPiu2n/UHB5pL1fGsa6Bgxce5gKqU091omsm/xq pxWoxzrS+wSvG67opPQZY2Jn9IuiSJfwYfbdAqm/fJdNgHy9e6TEZAPV6s684BWXYvuGf86uNDe +hAfVKKW5JuGFbxz4Ed2BS1DXvQ== X-Google-Smtp-Source: AGHT+IE5FQZIbtJOztigBOS9Avg82hSfSlcy7E3hwkLPHM/P7YdR0xqCIo+8j17gC4LIdPH64C7KVQUZllrbHiWF8g== X-Received: from pghx12.prod.google.com ([2002:a63:f70c:0:b0:bac:a20:5ee0]) (user=ackerleytng job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a20:3d85:b0:35e:d74:e4b6 with SMTP id adf61e73a8af0-36617e37d65mr8176588637.7.1765212427234; Mon, 08 Dec 2025 08:47:07 -0800 (PST) Date: Mon, 08 Dec 2025 08:47:05 -0800 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251117224701.1279139-1-ackerleytng@google.com> <20251117224701.1279139-5-ackerleytng@google.com> Message-ID: Subject: Re: [RFC PATCH 4/4] XArray: test: Increase split order test range in check_split() From: Ackerley Tng To: Zi Yan Cc: willy@infradead.org, akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, david@redhat.com, michael.roth@amd.com, vannapurve@google.com Content-Type: text/plain; charset="UTF-8" Zi Yan writes: > On 17 Nov 2025, at 17:47, Ackerley Tng wrote: > >> Expand the range of order values for check_split_1() from 2 * >> XA_CHUNK_SHIFT to 4 * XA_CHUNK_SHIFT to test splitting beyond 2 levels. >> >> Separate the loops for check_split_1() and check_split_2() calls, since >> xas_try_split() does not yet support splitting beyond 2 levels. > > xas_try_split() is designed to only split at most 1 level. It is used > for non-uniform split, which always splits a folio from order N to order N-1. > Thanks for explaining! In the next revision, I'll rename + check_split_1() to check_split_uniform() and + check_split_2() to check_split_non_uniform() in an earlier patch before, fixing the wording, in this patch, to be Separate the loops for check_split_uniform() and check_split_non_uniform() calls. Expanding the range of order values only applies for uniform splits, since non-uniform splits always split a folio from order N to order N-1. >> >> Signed-off-by: Ackerley Tng >> --- >> lib/test_xarray.c | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/lib/test_xarray.c b/lib/test_xarray.c >> index 42626fb4dc0e..fbdf647e4ef8 100644 >> --- a/lib/test_xarray.c >> +++ b/lib/test_xarray.c >> @@ -1905,12 +1905,16 @@ static noinline void check_split(struct xarray *xa) >> >> XA_BUG_ON(xa, !xa_empty(xa)); >> >> - for (order = 1; order < 2 * XA_CHUNK_SHIFT; order++) { >> + for (order = 1; order < 4 * XA_CHUNK_SHIFT; order++) { >> for (new_order = 0; new_order < order; new_order++) { >> check_split_1(xa, 0, order, new_order); >> check_split_1(xa, 1UL << order, order, new_order); >> check_split_1(xa, 3UL << order, order, new_order); >> + } >> + } >> >> + for (order = 1; order < 2 * XA_CHUNK_SHIFT; order++) { >> + for (new_order = 0; new_order < order; new_order++) { >> check_split_2(xa, 0, order, new_order); >> check_split_2(xa, 1UL << order, order, new_order); >> check_split_2(xa, 3UL << order, order, new_order); >> -- >> 2.52.0.rc1.455.g30608eb744-goog > > > -- > Best Regards, > Yan, Zi