mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Greg KH <gregkh@linuxfoundation.org>, Suman Anna <s-anna@ti.com>,
	Loic Pallardy <loic.pallardy@st.com>,
	LeyFoon Tan <lftan.linux@gmail.com>,
	Craig McGeachie <slapdau@yahoo.com.au>,
	Courtney Cavin <courtney.cavin@sonymobile.com>,
	Rob Herring <robherring2@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Josh Cartwright <joshc@codeaurora.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Kumar Gala <galak@codeaurora.org>,
	Girish K S <ks.giri@samsung.com>,
	Jassi Brar <jaswinder.singh@linaro.org>
Subject: Re: [PATCHv5 2/4] mailbox: Introduce framework for mailbox
Date: Wed, 11 Jun 2014 16:37:43 +0100	[thread overview]
Message-ID: <20140611153743.GI5099@sirena.org.uk> (raw)
In-Reply-To: <CABb+yY0G9Rn4mzA7Cn4__tR02WE4Q6-RQfQ06U6Kiiayey+RXA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1544 bytes --]

On Wed, May 28, 2014 at 09:50:21AM +0530, Jassi Brar wrote:
> On Wed, May 21, 2014 at 10:57 PM, Mark Brown <broonie@kernel.org> wrote:

> >> +     if (!cl->tx_tout) /* wait for ever */
> >> +             cl->tx_tout = msecs_to_jiffies(3600000);
> >> +     else
> >> +             cl->tx_tout = msecs_to_jiffies(cl->tx_tout);

> > Is the default wait for ever the best timeout - I'm not sure it's best
> > from a defensiveness point of view.  It should be fine either way,
> > it's just a matter of taste.

> The client wants the call to be blocking. Out of 'zero', 'infinity'
> and some 'valid' delay, it makes better sense to have 'infinity' than
> zero or another value that might be valid for some platform. I assume
> 1hr to be 'infinity', though I am open to better suggestions. Maybe
> put a WARN() ?

I think my inclination would be to have the client required to specify
what it thinks is a sensible delay and complain loudly if nothing is
specified.  Having zero default to wait for ever (as opposed to
something like a negative number) means that if someone memset()s the
struct (as people tend to) then if things go wrong the system will tend
to run into long timeouts which tend to give an unpleasant experience if
things go wrong.  

Forcing the user to think what a sensible delay is seems likely to
ensure that sensible values are picked rather than people not thinking
about it at all since if everything is working well and messages get
answers it's OK.

Sorry about the delay in replying here.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2014-06-11 15:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-15  6:08 [PATCHv5 0/4] Common Mailbox Framework Jassi Brar
2014-05-15  6:10 ` [PATCHv5 1/4] mailbox: rename pl320-ipc specific mailbox.h Jassi Brar
2014-05-15  6:11 ` [PATCHv5 2/4] mailbox: Introduce framework for mailbox Jassi Brar
2014-05-15 14:27   ` Arnd Bergmann
2014-05-16 13:33     ` Jassi Brar
2014-05-19 13:08       ` Arnd Bergmann
2014-05-19 18:03         ` Jassi Brar
2014-05-19 19:55           ` Bjorn Andersson
2014-05-19 20:01             ` Arnd Bergmann
2014-05-20 18:11             ` Jassi Brar
2014-05-29 15:43       ` Matt Porter
2014-05-30  5:31         ` Jassi Brar
2014-06-02 15:14           ` Matt Porter
2014-06-02 17:11             ` Jassi Brar
2014-06-02 22:04               ` Matt Porter
2014-06-03  9:35               ` Sudeep Holla
2014-06-03 10:21                 ` Jassi Brar
2014-06-03 15:06                   ` Sudeep Holla
2014-06-05 11:12                   ` Matt Porter
2014-06-05 11:39                     ` Jassi Brar
2014-06-11 16:07                     ` Mark Brown
2014-05-21 17:27   ` Mark Brown
2014-05-21 18:14     ` Arnd Bergmann
2014-05-28  4:20     ` Jassi Brar
2014-05-28 15:50       ` Suman Anna
2014-06-11 15:37       ` Mark Brown [this message]
2014-05-15  6:11 ` [PATCHv5 3/4] mailbox: Fix TX completion init Jassi Brar
2014-05-15  6:12 ` [PATCHv5 4/4] mailbox: Fix deleteing poll timer Jassi Brar

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=20140611153743.GI5099@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=arnd@arndb.de \
    --cc=courtney.cavin@sonymobile.com \
    --cc=galak@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=jaswinder.singh@linaro.org \
    --cc=joshc@codeaurora.org \
    --cc=ks.giri@samsung.com \
    --cc=lftan.linux@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.pallardy@st.com \
    --cc=robherring2@gmail.com \
    --cc=s-anna@ti.com \
    --cc=slapdau@yahoo.com.au \
    /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

all inboxes | Powered by JetHome®