All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Haakon Bugge <haakon.bugge@oracle.com>
Cc: Bob Pearson <rpearsonhpe@gmail.com>,
	"yangx.jy@fujitsu.com" <yangx.jy@fujitsu.com>,
	Leon Romanovsky <leon@kernel.org>,
	OFED mailing list <linux-rdma@vger.kernel.org>
Subject: Re: [rdma-core PATCH] providers/rxe: Replace '%' with '&' in check_qp_queue_full()
Date: Mon, 17 Jan 2022 10:35:04 -0400	[thread overview]
Message-ID: <20220117143504.GA8034@ziepe.ca> (raw)
In-Reply-To: <5A111A92-427C-4FE1-BDA1-6E8877350D20@oracle.com>

On Mon, Jan 17, 2022 at 11:12:12AM +0000, Haakon Bugge wrote:

> > The way these queues work they can only hold 2^n - 1 entries. The
> > reason for this is to distinguish empty and full.
> 
> You can simply mitigate that by having free-running counters, right?

That is generally the best design, with the cost of doing the & on
every use of queue data vs only on ++

Jason

      reply	other threads:[~2022-01-17 14:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11  1:41 [rdma-core PATCH] providers/rxe: Replace '%' with '&' in check_qp_queue_full() Xiao Yang
2022-01-11  2:22 ` yangx.jy
2022-01-13 20:51   ` Bob Pearson
2022-01-17 11:12     ` Haakon Bugge
2022-01-17 14:35       ` Jason Gunthorpe [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=20220117143504.GA8034@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=haakon.bugge@oracle.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rpearsonhpe@gmail.com \
    --cc=yangx.jy@fujitsu.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.