All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Amrani, Ram" <Ram.Amrani@cavium.com>
To: Yuval Shaia <yuval.shaia@oracle.com>,
	"Mintz, Yuval" <Yuval.Mintz@cavium.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"Kalderon, Michal" <Michal.Kalderon@cavium.com>
Subject: RE: [PATCH net 1/3] qed: Release CQ resource under lock on failure
Date: Thu, 26 Jan 2017 11:43:24 +0000	[thread overview]
Message-ID: <SN1PR07MB2207514E622BF7BED69695F5F8770@SN1PR07MB2207.namprd07.prod.outlook.com> (raw)
In-Reply-To: <20170125072426.GA4973@yuval-lap>

> Minor suggestion.
> Can you consider embedding the lock and unlock inside qed_bmap_release_id?
> There are two places where this is bad idea as driver needs to release two
> IDs but still one is in error flow and second is when destroying QP so for
> most cases code may look a bit better.
> 

The bitmap functions are being used by various bitmaps one of which is the cid.
The cid code must allocate two consecutive cids. So here the lock is over two calls
to the bit allocating call.

I am planning to recode the cid to use one bit instead of two, this is further
down the list.

Thanks for the suggestion,
Ram

  reply	other threads:[~2017-01-26 11:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24 21:15 [PATCH net 0/3] qed: RoCE infrastrucutre fixes Yuval Mintz
2017-01-24 21:15 ` Yuval Mintz
2017-01-24 21:15 ` [PATCH net 1/3] qed: Release CQ resource under lock on failure Yuval Mintz
2017-01-24 21:15   ` Yuval Mintz
     [not found]   ` <1485292523-8821-2-git-send-email-Yuval.Mintz-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
2017-01-25  7:24     ` Yuval Shaia
2017-01-26 11:43       ` Amrani, Ram [this message]
2017-02-16  9:19       ` Amrani, Ram
2017-01-24 21:15 ` [PATCH net 2/3] qed: Read queue state before releasing buffer Yuval Mintz
2017-01-24 21:15   ` Yuval Mintz
     [not found] ` <1485292523-8821-1-git-send-email-Yuval.Mintz-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
2017-01-24 21:15   ` [PATCH net 3/3] qed: Don't free a QP more than once Yuval Mintz
2017-01-24 21:15     ` Yuval Mintz

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=SN1PR07MB2207514E622BF7BED69695F5F8770@SN1PR07MB2207.namprd07.prod.outlook.com \
    --to=ram.amrani@cavium.com \
    --cc=Michal.Kalderon@cavium.com \
    --cc=Yuval.Mintz@cavium.com \
    --cc=davem@davemloft.net \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yuval.shaia@oracle.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.