lkml.org 
[lkml]   [2021]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] iommu/arm-smmu-v3: poll cmdq until it has space
From
Date
On 21/09/2021 12:43, Fernand Sieber wrote:
> do {

I didn't follow the full logic of this change yet ...

> llq->val = READ_ONCE(cmdq->q.llq.val);
> - if (!queue_full(llq))
> + if (!queue_has_space(llq, n))

But is the polarity really correct? That is, if we don't have space,
then exit with success (the function to check for space).

> break;
>
> + /*
> + * We must return here even if there's no space, because the producer
> + * having moved forward could mean that the last thread observing the
> + * SMMU progress has allocated space in the cmdq and moved on, leaving
> + * us in this waiting loop with no other thread updating
> + * llq->state->val.

what is llq->state->val?

> + */
> + if (llq->prod != prod)
> + return -EAGAIN;
> +
> ret = queue_poll(&qp);

Thanks,
John

\
 
 \ /
  Last update: 2021-09-21 18:21    [W:0.058 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site