Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3235117pxb; Tue, 13 Apr 2021 23:56:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykx1ii5ozC5hBpH1WgdROy/3K+otDHab+nadLcIaTuSWXe5rVIKOThFxwOKMF+lXyC1Tlf X-Received: by 2002:a17:906:170f:: with SMTP id c15mr35799347eje.358.1618383404892; Tue, 13 Apr 2021 23:56:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618383404; cv=none; d=google.com; s=arc-20160816; b=DKle8XWXwqHnAqSSC8pKnJgaV3JCmVwDUr6bExZYt270SmHKQ9ninAwLRBgoBajhE9 s069vVeT1t2O96+vyYi55zCyeJ+hd87r2YfJamT+lnQ54qhx+53w6cUdSOU0gS+ULtlP 80b5/N+D/lP+YFhnZv80kIf2Tu2KoJbsgJ5XG2mtPne7FIWW2jIn6hk+C/6lXbUVk33U NtAlCA0GeyFeYE760E9bz93jfyYBrLnO2axv57TIN/IfDWjUtNAMQ8Ws6WJR3QyK70K3 +9ue6m/sB4IZwMTN5xOnu7LPiQy/V5wm9tS+J082nUNj5ojqA7rRBzXtGK1grcu0kslr SU8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=dexUbzd9VcB2sp+U6xmRFJemKXDWhpez0KUYWHf8VNM=; b=pq5I/NixjFGubfDjZjdB5N+aPSW9u3gvCgk7kGDWFep66rsl5kLJGCrO7/Za6XDvZF jfRTx2JuWkmB1YJ3cbpNlj22TTgOvTYgzg+7sIpLYei6Unbn12gTeDO4e7yJQUb0C1Hk Ysq2wfLP4778BUfYg/TdUZ/BSwHtVnnbuZbfyh1rT6tmmNwbWiAQSiRYTJwzpuO9qZxR PU90E8cd7+jYa8HtEhxA3pz3agjsEke+sYwah+teGWdAoPTWAcFnmYwmoApDnF2lQODH cNBMzFw7dyDaGbBGkjEg8Sr4h4WNaNpzsOtOYUJTbpMUCQmfAeP37tZE6MlMk6oMAo8l 6Ggg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vHh0lruZ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=TYdiYP6g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qo18si10084088ejb.713.2021.04.13.23.56.21; Tue, 13 Apr 2021 23:56:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vHh0lruZ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=TYdiYP6g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346734AbhDMVZS (ORCPT + 99 others); Tue, 13 Apr 2021 17:25:18 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:48662 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348456AbhDMVZH (ORCPT ); Tue, 13 Apr 2021 17:25:07 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1618349086; 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=dexUbzd9VcB2sp+U6xmRFJemKXDWhpez0KUYWHf8VNM=; b=vHh0lruZVTyh+1jyo+pse63FD2gTlrnQIF6yw6jy4fzM4e1kx0dr29uTBmtNYJaiyAlgsy KNWJBXPn1jj6TaE1OZStKdamu8y7sUgBGopFftKTfFejsEDuo2QBV6/zv0VwbyQrMzY2Dg cyiOh55/NGon9taEDnEXtk1sD/1PZHSNWWT3zst1TPuwvcjCZE/lKk54ZMW3XOGhbcojmS fLsfYjPh7hNproNjU3o1+djTTgDUTJ9Uxkd2JK9Tlo13nhR/Es9IVO10lk+O3Hk1j1bkBI 8zPTDsxIYE6MRtavVgohuVlTmI1XY+rd2qCaBTAq4uuqEuVKQ4a7YtZHv5APCQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1618349086; 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=dexUbzd9VcB2sp+U6xmRFJemKXDWhpez0KUYWHf8VNM=; b=TYdiYP6g+bxEYTBknyxYg4pg9oIVzLTwRC9laSLa5oNncqQ2PGJzzNZTkb6+XhJjxEKYQq EdOtG8zNilr0yfAQ== To: Dave Chinner Cc: Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@redhat.com, will@kernel.org, longman@redhat.com, boqun.feng@gmail.com, bigeasy@linutronix.de, hch@infradead.org, npiggin@kernel.dk Subject: Re: bl_list and lockdep In-Reply-To: <20210413095837.GD63242@dread.disaster.area> References: <20210406123343.1739669-1-david@fromorbit.com> <20210406123343.1739669-4-david@fromorbit.com> <20210406132834.GP2531743@casper.infradead.org> <20210406212253.GC1990290@dread.disaster.area> <874kgb1qcq.ffs@nanos.tec.linutronix.de> <20210412221536.GQ1990290@dread.disaster.area> <87fszvytv8.ffs@nanos.tec.linutronix.de> <20210413095837.GD63242@dread.disaster.area> Date: Tue, 13 Apr 2021 23:24:45 +0200 Message-ID: <87o8ehyj1e.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dave, On Tue, Apr 13 2021 at 19:58, Dave Chinner wrote: > On Tue, Apr 13, 2021 at 01:18:35AM +0200, Thomas Gleixner wrote: > So for solving the inode cache scalability issue with RT in mind, > we're left with these choices: > > a) increase memory consumption and cacheline misses for everyone by > adding a spinlock per hash chain so that RT kernels can do their > substitution magic and make the memory footprint and scalability > for RT kernels worse > > b) convert the inode hash table to something different (rhashtable, > radix tree, Xarray, etc) that is more scalable and more "RT > friendly". > > c) have RT kernel substitute hlist-bl with hlist_head and a spinlock > so that it all works correctly on RT kernels and only RT kernels > take the memory footprint and cacheline miss penalties... > > We rejected a) for the dentry hash table, so it is not an appropriate > soltion for the inode hash table for the same reasons. > > There is a lot of downside to b). Firstly there's the time and > resources needed for experimentation to find an appropriate > algorithm for both scalability and RT. Then all the insert, removal > and search facilities will have to be rewritten, along with all the > subtlies like "fake hashing" to allow fielsysetms to provide their > own inode caches. The changes in behaviour and, potentially, API > semantics will greatly increase the risk of regressions and adverse > behaviour on both vanilla and RT kernels compared to option a) or > c). > > It is clear that option c) is of minimal risk to vanilla kernels, > and low risk to RT kernels. It's pretty straight forward to do for > both configs, and only the RT kernels take the memory footprint > penalty. > > So a technical analysis points to c) being the most reasonable > resolution of the problem. I agree with that analysis for technical reasons and I'm not entirely unfamiliar how to solve hlist_bl conversions on RT either as you might have guessed. Having a technical argument to discuss and agree on is far simpler than going along with "I don't care". Thanks for taking the time to put a technical rationale on this! tglx