Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: hariprasad@chelsio.com
Cc: netdev@vger.kernel.org, leedom@chelsio.com,
	nirranjan@chelsio.com, ganeshgr@chelsio.com
Subject: Re: [PATCHv2 net-next] cxgb4: Synchronize access to mailbox
Date: Fri, 06 Jan 2017 15:55:46 -0500 (EST)	[thread overview]
Message-ID: <20170106.155546.287211400588300555.davem@davemloft.net> (raw)
In-Reply-To: <1483672640-18185-1-git-send-email-hariprasad@chelsio.com>

From: Hariprasad Shenai <hariprasad@chelsio.com>
Date: Fri,  6 Jan 2017 08:47:20 +0530

> The issue comes when there are multiple threads attempting to use
> the mailbox facility at the same time.
> When DCB operations and interface up/down is run in a loop for every
> 0.1 sec, we observed mailbox collisions. And out of the two commands
> one would fail with the present code, since we don't queue the second
> command.
> 
> To overcome the above issue, added a queue to access the mailbox.
> Whenever a mailbox command is issued add it to the queue. If its at
> the head issue the mailbox command, else wait for the existing command
> to complete. Usually command takes less than a milli-second to
> complete.
> 
> Also timeout from the loop, if the command under execution takes
> long time to run.
> 
> In reality, the number of mailbox access collisions is going to be
> very rare since no one runs such abusive script.
> 
> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>

Applied.

      reply	other threads:[~2017-01-06 20:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06  3:17 [PATCHv2 net-next] cxgb4: Synchronize access to mailbox Hariprasad Shenai
2017-01-06 20:55 ` David Miller [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=20170106.155546.287211400588300555.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ganeshgr@chelsio.com \
    --cc=hariprasad@chelsio.com \
    --cc=leedom@chelsio.com \
    --cc=netdev@vger.kernel.org \
    --cc=nirranjan@chelsio.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox