From: Greg KH <gregkh@linuxfoundation.org>
To: Oded Gabbay <oded.gabbay@gmail.com>
Cc: "Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
Omer Shpigelman <oshpigelman@habana.ai>,
Tomer Tayar <ttayar@habana.ai>
Subject: Re: [PATCH] habanalabs: print to kernel log when reset is finished
Date: Sat, 10 Aug 2019 19:23:17 +0200 [thread overview]
Message-ID: <20190810172317.GA4482@kroah.com> (raw)
In-Reply-To: <CAFCwf10SV0w-HQHuONSmdcDYFjmCJN3PLzc89MQMO4j37Qum=w@mail.gmail.com>
On Sat, Aug 10, 2019 at 06:29:16PM +0300, Oded Gabbay wrote:
> On Sat, Aug 10, 2019 at 3:53 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Sat, Aug 10, 2019 at 03:38:08PM +0300, Oded Gabbay wrote:
> > > Now that we don't print the queue testing messages, we need to print when
> > > the reset is finished so whoever looks at the kernel log will know the
> > > reset process was finished successfully and the driver is not stuck.
> > >
> > > Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
> > > ---
> > > drivers/misc/habanalabs/device.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/drivers/misc/habanalabs/device.c b/drivers/misc/habanalabs/device.c
> > > index 9a5926888b99..1fac808c2546 100644
> > > --- a/drivers/misc/habanalabs/device.c
> > > +++ b/drivers/misc/habanalabs/device.c
> > > @@ -907,6 +907,8 @@ int hl_device_reset(struct hl_device *hdev, bool hard_reset,
> > > else
> > > hdev->soft_reset_cnt++;
> > >
> > > + dev_info(hdev->dev, "Successfully finished resetting the device\n");
> >
> > Really? For doing things "properly" there is no need to spam the kernel
> > log. Only spit stuff out if an error happens.
> >
> > thanks,
> >
> > greg k-h
>
> I beg to differ for two reasons:
> 1. Reset happens very rarely, if at all. So this message (that get
> printed after reset is done) will definitely not spam the kernel log.
> 2. When a reset starts we print an appropriate error message. I think
> it is expected by the user that we will also print if and when the
> reset has finished successfully. I really believe that lack of this
> printing might be deceiving for users.
How is anyone going to parse the kernel log for anything to know if
something happens?
How do you trigger a reset? Is it done by userspace? If so, just
notify them then.
thanks,
greg k-h
next prev parent reply other threads:[~2019-08-10 17:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-10 12:38 [PATCH] habanalabs: print to kernel log when reset is finished Oded Gabbay
2019-08-10 12:53 ` Greg KH
2019-08-10 15:29 ` Oded Gabbay
2019-08-10 17:23 ` Greg KH [this message]
2019-08-10 17:45 ` Oded Gabbay
2019-08-11 7:38 ` Greg KH
2019-08-11 7:40 ` Oded Gabbay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190810172317.GA4482@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oded.gabbay@gmail.com \
--cc=oshpigelman@habana.ai \
--cc=ttayar@habana.ai \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox