RE: [PATCH v2] Fix EDAC sdram_scrub_rate read/write failure

From: Luck, Tony
Date: Mon Sep 19 2011 - 16:23:40 EST


> @Tony, do you think the above makes sense? Anything against changing
> that part of the EDAC API to say:

> Sdram memory scrubbing rate:

> If configuration fails or memory scrubbing is not implemented,
> the access to that attribute from userspace will fail.

Ideally we'd not have the file there at all if memory scrubbing isn't
implemented.

I like having the write fail if the driver cannot set the chosen
scrub rate ... though there seems to be some wiggle room ... scrub
rates aren't exact, the user can try to set one and then read back
to find out what the rate was actually rounded to. If you have to
read back anyway, then reading back to find out if you failed doesn't
look quite so odd (still odd, but with some sort of logic).

-Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/