Re: [Linux-nvdimm] [PATCH] pmem: Add prints at module load and unload

From: Boaz Harrosh
Date: Tue Apr 07 2015 - 11:34:18 EST


On 04/07/2015 06:19 PM, Christoph Hellwig wrote:
> On Sun, Apr 05, 2015 at 11:50:06AM +0300, Boaz Harrosh wrote:
>> [ +0.000537] pmem: init 2 devices => 0
>>
>> So I have all the information. And I know the driver was actually loaded
>> successfully on the expected two regions.
>
> The second number will always be 0, so no point in printing it.

Why it can be any error that was collected in the load process its
the error we are returning to the Kernel from pmem_init()
Any none zero will mean module will not load and modprobe will
return with an exit code.

(Errors from probe() will be returned here)

> Also device can be hotplugged at runtime, e.g. your magic PCIe device,
> so iff you really want to print anything ->probe is the place for it.
>

Yes but for now it is only very much static. We could add it later
when that happens, no?

> But I still don't think we need it, once booted you can trivially look
> up the information in sysfs.
>

Its not for the systems I can probe around in sysfs and or just ls /dev/pmem*

It is postmortem when all I have is the logs and say a stack trace.
For us in the lab it is very important, all we need is the single
line on load/unload. But at probe time is fine as well, just more
chatty as you were complaining.

I will post two versions of this right away, I did it and forgot
to post.

Thanks
Boaz

--
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/