From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from va-2-45.ptr.blmpb.com (va-2-45.ptr.blmpb.com [209.127.231.45]) (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 AEECF401485 for ; Thu, 9 Jul 2026 09:57:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.127.231.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783591051; cv=none; b=eWg+jq1lt/aZhzoGFG851BvN/kGMKuKQ+C558dx8jYp1llqhO6QSBcld6RND6cbxxtCiGtVv98rmfAi6wKvO/tm6SCxhwjRy/aQKat+868EHXoxh5xC8C2+AhQRWNp7hl+GwBSTlbejc4PKCfuzm8pu/RLFvc0JYjeZ2nAchpXQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783591051; c=relaxed/simple; bh=ScNDU72QZIGljZYAXX3TtqEW+QUCJIdbOtB91OHVf94=; h=Content-Type:To:From:Subject:Date:Message-Id:In-Reply-To: Mime-Version:Cc:References; b=MooM3sEOVKH03pJ5U05w4PD9TpTUj/w9/z8A+zvA0qGR+VHGnCq9D8WhkeQ8JTTPHxWxRyPJcVd7pDNSMr8jpJZ0u3fz/lcdngdXSKZfKsSSYkQGY5hZrdjzz7phSxGqZciGX3RdGLSoW4UBsnboPupRfDNwfUs+MAS9/0wepDg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fygo.io; spf=pass smtp.mailfrom=fygo.io; dkim=pass (2048-bit key) header.d=fygo-io.20200929.dkim.larksuite.com header.i=@fygo-io.20200929.dkim.larksuite.com header.b=GKr+YBcv; arc=none smtp.client-ip=209.127.231.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fygo.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fygo.io Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fygo-io.20200929.dkim.larksuite.com header.i=@fygo-io.20200929.dkim.larksuite.com header.b="GKr+YBcv" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=s1; d=fygo-io.20200929.dkim.larksuite.com; t=1783591040; h=from:subject:mime-version:from:date:message-id:subject:to:cc: reply-to:content-type:mime-version:in-reply-to:message-id; bh=HOGu0DcVoj6IGMDLrDh2fK8YIc1W/aNya5uNQNN/KKs=; b=GKr+YBcv0NFr3xoiiCd7poxeeFYuqJw3Ssw/t0vRxeohJnXWLEBUUOLgO4sXJvs/1SWT9j ZjAdreVVOJuzGQofpZTmAECG0IVX0xb/2EZchMjOa25K4U3p/VEECoRuxp/GwjnN9rV5mQ QcG6NulqKgrLJ+rsthrOPE4LYVv7KdtDhauSFIKDpX3ekCGczn3YHRNRckWIOxRxMU/EPD JcFdw8uQjIeirkRxl3Lz3rf71q53c39Up0LgV2lwdH76qMdIPOFoznH5Dmyr7qh6Q48G3z 9oaQJAfdFBbzY0+QLFjjE2rqf5YXQB+smaNvRxLDvDeXpzmRNtBc4zbEhi+CEw== Reply-To: yukuai@fygo.io User-Agent: Mozilla Thunderbird Content-Type: text/plain; charset=UTF-8 Received: from [192.168.1.104] ([39.182.0.144]) by smtp.larksuite.com with ESMTPS; Thu, 09 Jul 2026 09:57:18 +0000 Content-Transfer-Encoding: quoted-printable To: "Christoph Hellwig" , "yu kuai" From: "yu kuai" Subject: Re: [RFC PATCH v1 15/17] blk-cgroup: remove blkg radix tree preloading Date: Thu, 9 Jul 2026 17:57:13 +0800 Message-Id: X-Original-From: yu kuai In-Reply-To: <20260709061837.GF16504@lst.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Lms-Return-Path: Cc: "Jens Axboe" , "Tejun Heo" , "Keith Busch" , "Sagi Grimberg" , "Alasdair Kergon" , "Benjamin Marzinski" , "Mike Snitzer" , "Mikulas Patocka" , "Dongsheng Yang" , "Zheng Gu" , "Coly Li" , "Kent Overstreet" , "Josef Bacik" , "Nilay Shroff" , , , , , References: <20260704195124.1375075-1-yukuai@kernel.org> <20260704195124.1375075-16-yukuai@kernel.org> <20260709061837.GF16504@lst.de> Hi, =E5=9C=A8 2026/7/9 14:18, Christoph Hellwig =E5=86=99=E9=81=93: > On Sun, Jul 05, 2026 at 03:51:22AM +0800, Yu Kuai wrote: >> From: Yu Kuai >> >> blkg creation is now serialized by q->blkcg_mutex and no longer runs >> under q->queue_lock. The radix tree is initialized with GFP_NOWAIT, so >> radix_tree_insert() cannot sleep while blkcg->lock is held and the old >> preload dance is no longer needed. >> >> Remove the preload calls and the associated unwind path. > Isn't the GFP_NOWAIT a bit of a problem because it can fail way too > easy? I think GFP_NOWAIT should not be a problem because it's only possible to allocate blkg when the thread is issuing the first IO. And it's not a big deal to fail nowait in this case because the caller should fall back to sleepable context to issue this IO, and then blkg will be created. The foll= owing nowait IO issued by this thread should no longer hit blkg allocation path anymore. > > What about converting both the radix tree and list to an xarray > using the internal xarray to deal with sleeping allocations? > --=20 Thanks, Kuai