Messages in this thread | | | From | Shiju Jose <> | Subject | RE: [RFC PATCH v8 01/10] ras: scrub: Add scrub subsystem | Date | Wed, 8 May 2024 16:59:18 +0000 |
| |
>-----Original Message----- >From: Borislav Petkov <bp@alien8.de> >Sent: 06 May 2024 11:30 >To: Shiju Jose <shiju.jose@huawei.com> >Cc: linux-cxl@vger.kernel.org; linux-acpi@vger.kernel.org; linux- >mm@kvack.org; dan.j.williams@intel.com; dave@stgolabs.net; Jonathan >Cameron <jonathan.cameron@huawei.com>; 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 ><tanxiaofei@huawei.com>; Zengtao (B) <prime.zeng@hisilicon.com>; >kangkang.shen@futurewei.com; wanghuiqiang <wanghuiqiang@huawei.com>; >Linuxarm <linuxarm@huawei.com> >Subject: Re: [RFC PATCH v8 01/10] ras: scrub: Add scrub subsystem > >On Thu, Apr 25, 2024 at 06:11:13PM +0000, Shiju Jose wrote: >> It is expected to have multiple RAS-specific functionalities other >> than scrubbing in long run. Most of the classes in the kernel found >> as /sys/class/<class-name>/<class-name>X/ >> >> If not, however /sys/class/ras/<module -name>X/<feature> is more >> suitable because there are multiple device instances such as cxl >> devices with scrub control feature. For example, >> /sys/class/ras/cxlX/scrub > >Make it as user-friendly as possible. cxlX is not as user-friendly as > >/sys/class/ras/cxl/<mem_accelerator> > /<fancy_bla_thing> > >and so on. > >Yes, you can introduce a special category .../ras/cxl/ if there are multiple cxl >devices which have RAS functionality on them. Sure.
> >> Presently underlying hw driver does the check. I think this will >> become more complex if does in the common rate_store() if we have to >> check against either a list of possible rates or min and max rates. > >Ok. > >> >> +DEVICE_ATTR_RW(enable_background); >> >> +DEVICE_ATTR_RO(name); >> >> +DEVICE_ATTR_RW(rate); >> >> +DEVICE_ATTR_RO(rate_available); >> > >> >static > >Forgot one. Will correct.
> >> This is the ras instance id (X) used for scrub control feature, >> /sys/class/ras/rasX/scrub/ > >Yeah, as discussed above. OK. > >> >> +static int __init memory_scrub_control_init(void) { >> >> + return class_register(&scrub_class); } >> >> +subsys_initcall(memory_scrub_control_init); >> > >> >You can't just blindly register this thing without checking whether >> >there are even any hw scrubber devices on the system. >> >> I think it happens only when a dependent module as autoloaded based on >> a scrub device existing with exception of memory scrub control built >> in and who would build this in? > >You think or you know? We know as I had tested.
> >-- >Regards/Gruss, > Boris. > >https://people.kernel.org/tglx/notes-about-netiquette
Thanks, Shiju
| |