From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boaz Harrosh Subject: [PATCH A+B] pmem: Add prints at module load and unload Date: Tue, 07 Apr 2015 18:46:15 +0300 Message-ID: <5523FBC7.80301@plexistor.com> References: <1427872339-6688-1-git-send-email-hch@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: ross.zwisler@linux.intel.com To: Christoph Hellwig , linux-nvdimm@ml01.01.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, axboe@kernel.dk Return-path: In-Reply-To: <1427872339-6688-1-git-send-email-hch@lst.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hi Christoph, Ingo It is important in the lab for postmortem analysis to know if pmem driver loaded and/or unloaded. And the return code from this operation. I submit two versions [A] more chatty and version [B]. Both give me the info I need. I like [B] because [A] prints more lines, and also the driver might not load at the end and we would still not see it from [A]'s prints. But it does not matter that much just take any one you guys like better. Here are the commit logs: --- [PATCH 1A] pmem: Add prints at pmem_probe/remove Add small prints at creation/remove of pmem devices. So we can see in dmesg logs when users loaded/unloaded the pmem driver and what devices were created. The prints will look like this: Printed by e820 on load: [ +0.000000] user: [mem 0x0000000100000000-0x000000015fffffff] persistent (type 12) [ +0.000000] user: [mem 0x0000000160000000-0x00000001dfffffff] persistent (type 12) ... Printed by modprobe pmem: [ +0.003065] pmem pmem.0.auto: probe [0x0000000100000000:0x60000000] [ +0.001816] pmem pmem.1.auto: probe [0x0000000160000000:0x80000000] ... Printed by modprobe -r pmem: [ +16.299145] pmem pmem.1.auto: remove [ +0.011155] pmem pmem.0.auto: remove Signed-off-by: Boaz Harrosh --- [PATCH 1B] pmem: Add prints at module load/unload When debugging people's systems it is helpful to see what went on. The load and unload of pmem is an important event. The importance is the number of loaded devices and error status. The exact device's addresses created we can see from the other prints at e820 so no need to duplicate this information. After this patch the important info at dmesg will be: Printed by the e820 code on load: [ +0.000000] user: [mem 0x0000000100000000-0x000000015fffffff] persistent (type 12) [ +0.000000] user: [mem 0x0000000160000000-0x00000001dfffffff] persistent (type 12) ... Printed by pmem modprobe: [ +0.000537] pmem: init 2 devices => 0 ... Printed by pmem modprobe -r: [ +0.000537] pmem: exit Signed-off-by: Boaz Harrosh --- Thanks Boaz