[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30ce0b8e3743a71870103647b352acbae2328c09.camel@perches.com>
Date: Fri, 29 Mar 2019 09:39:40 -0700
From: Joe Perches <joe@...ches.com>
To: Greg KH <gregkh@...uxfoundation.org>,
Oded Gabbay <oded.gabbay@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] habanalabs: improve error messages
On Fri, 2019-03-29 at 17:29 +0100, Greg KH wrote:
> On Thu, Mar 28, 2019 at 09:13:13AM +0200, Oded Gabbay wrote:
> > This patch improves two error messages to help the user to
> > better understand what error occurred.
[]
> > diff --git a/drivers/misc/habanalabs/memory.c b/drivers/misc/habanalabs/memory.c
[]
> > @@ -109,7 +109,7 @@ static int alloc_device_memory(struct hl_ctx *ctx, struct hl_mem_in *args,
> > page_size);
> > if (!phys_pg_pack->pages[i]) {
> > dev_err(hdev->dev,
> > - "ioctl failed to allocate page\n");
> > + "Failed to allocate device memory (out of memory)\n");
>
> No need for a message at all here, right? The core should have already
> told you you had a problem.
I do not understand this code all that well, but I am uncertain
if all the possible pool allocation functions emit an OOM message
on failure.
Also, there is another pool allocation for the contiguous
allocation attempt that has a similar OOM in this function.
Powered by blists - more mailing lists