Re: [PATCH v1 1/3] mm: memory-failure: Add memory failure stats to sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 16, 2023 at 12:15:33PM -0800, Andrew Morton wrote:
> On Mon, 16 Jan 2023 19:39:00 +0000 Jiaqi Yan <jiaqiyan@xxxxxxxxxx> wrote:
> 
> > +/*
> > + * Per NUMA node memory failure handling statistics.
> > + */
> > +struct memory_failure_stats {
> > +	/*
> > +	 * Number of pages poisoned.
> > +	 * Cases not accounted: memory outside kernel control, offline page,
> > +	 * arch-specific memory_failure (SGX), and hwpoison_filter()
> > +	 * filtered error events.
> > +	 */
> > +	unsigned long pages_poisoned;
> > +	/*
> > +	 * Recovery results of poisoned pages handled by memory_failure,
> > +	 * in sync with mf_result.
> > +	 * pages_poisoned = pages_ignored + pages_failed +
> > +	 *		    pages_delayed + pages_recovered
> > +	 */
> > +	unsigned long pages_ignored;
> > +	unsigned long pages_failed;
> > +	unsigned long pages_delayed;
> > +	unsigned long pages_recovered;
> > +};
> 
> I don't think the "pages_" here add much value - a simple code comment
> saying "everything counts in pages" should suffice.  If you're feeling
> deprived of columnar space, maybe just remove?  Or not ;)

I personally feel more like removing the "pages_".  And I feel that the
main counter can be renamed with pages_total or total, because it show the
relationship among counters, and the structure name "memory_failure_stats"
already implies that the counter is about hwpoisoned pages.

Thanks,
Naoya Horiguchi




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux