Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2926755lqo; Tue, 21 May 2024 01:07:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWDrtCE+v26IKAFhoeoQKgrGRhHb902jUEXZCpTV3zaZFF7k8Q1VDn5QkBR7YVNiyjYJja/v8jN2PBtcG/TPzxr7opUedZwZ6xf9gzDAw== X-Google-Smtp-Source: AGHT+IFwoVSWSGi4a70k7mPodhQHHErpsptsph+MifXCPelMpFZjRgPUXwZFGJNeySwrjXdg8H1L X-Received: by 2002:a2e:8404:0:b0:2e7:b9d:31da with SMTP id 38308e7fff4ca-2e70b9d327fmr99605351fa.16.1716278853299; Tue, 21 May 2024 01:07:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716278853; cv=pass; d=google.com; s=arc-20160816; b=xjv6RelfJmD+sbPfENsacH103SCgPxDDGRJ2+czU8dbsZwEgg45QKlucvjVOdTkfji D9hkbJRgb++4E6Dy5aSPpVJl54qdfWllb2s0SadAcZoDkLRBeLNUF2fzgEvyJ1UVwD9A 6OoSscE4ZjoKym98Wutgo49mTL47uDG5S65Ptz0Ki0Pl1DWL3zEVf182jHtCHOF+swPQ wcqMYEWXeED/tEoT2vcqMPXOxQQHGuS89Wntaj06vEF9/4N3WpouWNokHdeVQEplEIQw SCfUb0Igt1slr+xgeP8QKK2q4kE/gZySFuLcrF3vu2PBMnRfQYkwhljC36THzDuTZy+m fFNw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bUrz/vVy5veieaUpjlFebAVZrIuR6VrAhNkZf46x+aM=; fh=N4IMfiQz2KzxtuG5P+TF4lVk6TQWFkxBF+U0DqDUJ3s=; b=fhTmnnba9tywCX2hKmUmDnLe0Fy913Xato2Ky0g0nkXXGmlyToK/Go42z2wCs+LW8+ Y/BtQ5tiqgdnZRYt7SeIsEPC8gcIgXlzqni7MQkWdIngZl01/GRhxmx0/wYhhK2n3djR INLt7AQfmbMRm1fe7PVrqgxyRjEAwCTHFJLpM84hrCopL4mgW3T9U8xAQPBvg6nm2KLy cqK4JMkZxv9Ctd0df3qstZjpizgUaO6EZQp1VOxGy7hIqy7f1+qaas0/UOEX2/wjAfFg btBhwkSaiUiPT6glJ/Z5Pdb9vNkPTMybI26kfqSz1U7lFRsWCnqjz/PEfACYB9IA3Csu ehKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=TbMaAm5p; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-184616-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184616-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a1794689bsi1322307666b.146.2024.05.21.01.07.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 01:07:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184616-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=TbMaAm5p; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-184616-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184616-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CD4971F21A09 for ; Tue, 21 May 2024 08:07:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D69F6548EC; Tue, 21 May 2024 08:07:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="TbMaAm5p" Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (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 06E782209F; Tue, 21 May 2024 08:07:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716278841; cv=none; b=EbN45Sws2fb3osoIY7Luk2/UIPrkJZMBsKhO7HjC3841Pm78eLeHyHFXmfYo9sPtZwjEMElTHEUpUXjpZB3YVo26S6rpoAMyOpD+Rr9NihVYw7hCw8st3XhTJUM+a7Q+xOiBhD5euuxXiy597Dp+ZwxQ1EP4l/6F8R15MMR5H+Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716278841; c=relaxed/simple; bh=ckPMRuIbbfcjK4leF67Zyjh1c9FjVXVpqOAReRsiJgY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KVX8lui7gfNaWAiMvscczfuJ81ZMYidiNLxcTcMHFicQWGpHbw+7CHSqNqKZWm12TuJQO2MSYiT1VjPGJeFiRmfBZt7MrpC+ETAA2ReDLGXH5H2g82wkPGb+Sd2w3xfRhTbdd++FlbLtPprlUpFX9qKMpKHw/8WKqJhInhitFHA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=TbMaAm5p; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id AD51140E0254; Tue, 21 May 2024 08:07:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id FQIIf5xTKZTj; Tue, 21 May 2024 08:07:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1716278833; bh=bUrz/vVy5veieaUpjlFebAVZrIuR6VrAhNkZf46x+aM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TbMaAm5pqlP8mAwrgyTY1siPWBqt9Xdn3FfN+/H4eL+oqvHy69dDQYM148H7Ud3V9 5ljZCdAobGwLYqllyGYk/mpW1jH1vCKur0QKIDU6DB7z0ZUNh4lpcXgibYeJLoW03p t2qrLEapGwEMIOB/xDkdN+zRn0IeVFKlFo/sKzQfophQumyLjD4lRt55TdNT46WCDE EOgKVOnCYNpEzdyk7E4CLMmUrlmDXb9Ww3ClEDBHHyBaXNk+uYfdvx18Sse4vl+AXt Jl2nVWN73SEgL8+IDfk9Kgke6QDnN7nDNG+A7kqxGEjhSZw5kjk+9sVIPL3+ien+/9 Zz0rWImSt2CnDhZIlD7sVFBQvHpEwpeEyzEcrQFqWIyImymWw2dfS1L4JYmTIoOWmV anUIcAhaYFRCSoSZGeGZbsX+X0pN537YYXUNhJeFbAcMnqbvKkTh4OXPh75nOQztHc l0YXYKtmfpsJjFvNrjbqTp0l7YjuZlZkQo5gFpOzn+0fP9PNheNhdx1A2kygHA1ued XKXh2RIk+TArNwtjnkqCET45albjyozv4L2u9vHCCG/MHK9IBfdN6+WqTTuwWsCis/ zq/e79l4rwRCUbc14OBhFQ6fVrzR3+XooxlVQ54/8izgmCWgAsiPtVXl8kX9/9Nj50 ervES1GITMpUmD2qO8MTN1CE= Received: from zn.tnic (p5de8ee85.dip0.t-ipconnect.de [93.232.238.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id C3AF740E01A3; Tue, 21 May 2024 08:06:26 +0000 (UTC) Date: Tue, 21 May 2024 10:06:21 +0200 From: Borislav Petkov To: Jonathan Cameron Cc: Dan Williams , Shiju Jose , "linux-cxl@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "linux-mm@kvack.org" , "dave@stgolabs.net" , "dave.jiang@intel.com" , "alison.schofield@intel.com" , "vishal.l.verma@intel.com" , "ira.weiny@intel.com" , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "david@redhat.com" , "Vilas.Sridharan@amd.com" , "leo.duran@amd.com" , "Yazen.Ghannam@amd.com" , "rientjes@google.com" , "jiaqiyan@google.com" , "tony.luck@intel.com" , "Jon.Grimm@amd.com" , "dave.hansen@linux.intel.com" , "rafael@kernel.org" , "lenb@kernel.org" , "naoya.horiguchi@nec.com" , "james.morse@arm.com" , "jthoughton@google.com" , "somasundaram.a@hpe.com" , "erdemaktas@google.com" , "pgonda@google.com" , "duenwen@google.com" , "mike.malvestuto@intel.com" , "gthelen@google.com" , "wschwartz@amperecomputing.com" , "dferguson@amperecomputing.com" , "wbs@os.amperecomputing.com" , "nifan.cxl@gmail.com" , tanxiaofei , "Zengtao (B)" , "kangkang.shen@futurewei.com" , wanghuiqiang , Linuxarm , Greg Kroah-Hartman , Jean Delvare , Guenter Roeck , Dmitry Torokhov Subject: Re: [RFC PATCH v8 01/10] ras: scrub: Add scrub subsystem Message-ID: <20240521080621.GBZkxV_ZWnbbrq-yV_@fat_crate.local> References: <20240509200306.GAZj0r-h5Tnc0ecIOz@fat_crate.local> <663d3e58a0f73_1c0a1929487@dwillia2-xfh.jf.intel.com.notmuch> <20240509215147.GBZj1Fc06Ieg8EQfnR@fat_crate.local> <663d55515a2d9_db82d2941e@dwillia2-xfh.jf.intel.com.notmuch> <20240510092511.GBZj3n9ye_BCSepFZy@fat_crate.local> <663e55c59d9d_3d7b429475@dwillia2-mobl3.amr.corp.intel.com.notmuch> <20240511101705.GAZj9FoVbThp7JUK16@fat_crate.local> <20240517121554.000031d4@Huawei.com> <20240517124418.00000b48@Huawei.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=utf-8 Content-Disposition: inline In-Reply-To: <20240517124418.00000b48@Huawei.com> On Fri, May 17, 2024 at 12:44:18PM +0100, Jonathan Cameron wrote: > Given we are talking about something new, maybe this is an opportunity > to not perpetuate this? > > If we add scrub in here I'd prefer to just use the normal bus registration > handling rather than creating a nest of additional nodes. So perhaps we > could consider > /sys/bus/edac/device/scrub0 (or whatever name makes sense, as per the > earlier discussion of cxl_scrub0 or similar). Yes, my main worry is how this RAS functionality is going to be all organized in the tree. Yes, EDAC legacy methods can die but the user-visible part can't so we might as well use it to concentrate stuff there. > Could consider moving the bus location of mc0 etc in future to there with > symlinks to /sys/bus/edac/device/mc/* for backwards compatibility either > via setting their parents or more explicit link creation. You can ignore the mc - that's the memory controller representation EDAC does and that's also kind of semi-legacy considering how heterogeneous devices are becoming. Nowadays, scrubbing functionality can be on anything that has memory and that's not only a memory controller. So it would actually be the better thing to abstract that differently and use .../edac/device/ for the different RAS functionalities. I.e., have the "device" organize it all. > These scrub0 would have their dev->parent set to who ever actually > registered them providing that reference cleanly and letting all the > normal device model stuff work more simply. Ack. > If we did that with the scrub nodes, the only substantial change from > a separate subsystem as seen in this patch set would be to register > them on the edac bus rather than a separate class. > > As you pointed out, there is a simple scrub interface in the existing > edac memory controller code. How would you suggest handling that? > Have them all register an additional device on the bus (as a child > of the mcX devices) perhaps? Seems an easy step forwards and should > be no backwards compatibility concerns. Well, you guys want to control that scrubbing from userspace and those old things probably do not fit that model? We could just not convert them for now and add them later if really needed. I.e., leave sleeping dogs lie. > It absolutely doesn't as long as we can do it fairly cleanly within > existing code. I wasn't sure that was possible, but you know edac > a lot better than me and so I'll defer to you on that! Meh, I'm simply maintaining it because no one else wants to. :) > Several options for that, but fair question - bringing (at least some of) > the RAS mess together will focus reviewer bandwidth etc better. Review is more than appreciated, as always. > I'm definitely keen on unifying things as I agree, this mixture of different > RAS functionality is a ever worsening mess. Yap, it needs to be unified and reigned into something more user-friendly and manageable. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette