linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oded Gabbay <oded.gabbay@gmail.com>
To: Omer Shpigelman <oshpigelman@habana.ai>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] habanalabs: use the user CB size as a default job size
Date: Wed, 18 Dec 2019 11:37:22 +0200	[thread overview]
Message-ID: <CAFCwf13GyEop7rWZ1i8E3=EXgtN6w3WJbB40KdsiG15ViMv-gQ@mail.gmail.com> (raw)
In-Reply-To: <20191216084207.19482-1-oshpigelman@habana.ai>

On Mon, Dec 16, 2019 at 10:42 AM Omer Shpigelman <oshpigelman@habana.ai> wrote:
>
> When no patched command buffer (CB) is created, use the user CB size as
> the job size.
>
> Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
> ---
>  drivers/misc/habanalabs/command_submission.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/misc/habanalabs/command_submission.c b/drivers/misc/habanalabs/command_submission.c
> index 8850f475a413..41e95513c591 100644
> --- a/drivers/misc/habanalabs/command_submission.c
> +++ b/drivers/misc/habanalabs/command_submission.c
> @@ -129,6 +129,8 @@ static int cs_parser(struct hl_fpriv *hpriv, struct hl_cs_job *job)
>                 spin_unlock(&job->user_cb->lock);
>                 hl_cb_put(job->user_cb);
>                 job->user_cb = NULL;
> +       } else if (!rc) {
> +               job->job_cb_size = job->user_cb_size;
>         }
>
>         return rc;
> @@ -585,10 +587,6 @@ static int _hl_cs_ioctl(struct hl_fpriv *hpriv, void __user *chunks,
>                 job->cs = cs;
>                 job->user_cb = cb;
>                 job->user_cb_size = chunk->cb_size;
> -               if (is_kernel_allocated_cb)
> -                       job->job_cb_size = cb->size;
> -               else
> -                       job->job_cb_size = chunk->cb_size;
>                 job->hw_queue_id = chunk->queue_index;
>
>                 cs->jobs_in_queue_cnt[job->hw_queue_id]++;
> --
> 2.17.1
>

This patch is:
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>

      reply	other threads:[~2019-12-18  9:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16  8:42 [PATCH] habanalabs: use the user CB size as a default job size Omer Shpigelman
2019-12-18  9:37 ` Oded Gabbay [this message]

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='CAFCwf13GyEop7rWZ1i8E3=EXgtN6w3WJbB40KdsiG15ViMv-gQ@mail.gmail.com' \
    --to=oded.gabbay@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oshpigelman@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;
as well as URLs for NNTP newsgroup(s).