From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752536AbbDEIuN (ORCPT ); Sun, 5 Apr 2015 04:50:13 -0400 Received: from mail-wg0-f48.google.com ([74.125.82.48]:33127 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751507AbbDEIuL (ORCPT ); Sun, 5 Apr 2015 04:50:11 -0400 Message-ID: <5520F73E.3020602@plexistor.com> Date: Sun, 05 Apr 2015 11:50:06 +0300 From: Boaz Harrosh User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Christoph Hellwig , Dan Williams CC: linux-nvdimm , linux-fsdevel , "linux-kernel@vger.kernel.org" , X86 ML , Jens Axboe , Ingo Molnar Subject: Re: [Linux-nvdimm] [PATCH] pmem: Add prints at module load and unload References: <1427872339-6688-1-git-send-email-hch@lst.de> <551D60BE.1070101@plexistor.com> <551D6488.9090501@plexistor.com> <20150402164431.GB9774@lst.de> In-Reply-To: <20150402164431.GB9774@lst.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/02/2015 07:44 PM, Christoph Hellwig wrote: > On Thu, Apr 02, 2015 at 09:01:14AM -0700, Dan Williams wrote: >>>> If anything I think these should be dev_dbg(). >>> >>> We do not have a dev at any of this point, and it does not >>> belong to any specific device. >> >> Ah, true this is prior to the driver attaching... that said it seems >> more relevant to print from probe() (where we do have a device) than >> init where the device may remain idle due to some other policy. >> >>> Also I would like this >>> _info and not _dbg so to always have it, also for production. >>> See the chatter for a single SCSI disk the minimum we need >>> is just the small print that tells all that we need (for now) >> >> Not sure we want to follow so closely in the footsteps of SCSI's chattiness. > > Defintively not! A single dev_info at ->probe time sounds ok, something > like: > > dev_info(dev, "registering region [0x%pa:0x%zx]\n", > &pmem->phys_addr, pmem->size); > > but there are plenty other drivers not that chatty, e.g. virtio and we're > doing just fine for them. > For me, my print is just the exact amount. So I will see in my dmesg: [ +0.000000] user: [mem 0x0000000100000000-0x000000015fffffff] persistent (type 12) [ +0.000000] user: [mem 0x0000000160000000-0x00000001dfffffff] persistent (type 12) ... [ +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. Your print above will give me two prints with information I already have. All I want to know from users logs is that the driver was actually loaded successful or not. And when it was unloaded. I think this is the bear minimum that gives me all the information I need. Less then this I would be missing a very important event. Thanks Boaz