Linux bluetooth development
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Szymon Janc <szymon.janc@tieto.com>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>
Subject: Re: [RFC 4/5] android/bluetooth: Add support for caching remote device info
Date: Tue, 14 Jan 2014 18:55:31 +0100	[thread overview]
Message-ID: <1877346.eJJvW3yP1x@athlon> (raw)
In-Reply-To: <CABBYNZJRVE50AVx0Tm+y_MMuO94U4wEARetXyhRf8UckJCwJcw@mail.gmail.com>

Hi Luiz,

On Tuesday 14 January 2014 17:49:54 Luiz Augusto von Dentz wrote:
> Hi Szymon,
> 
> On Tue, Jan 14, 2014 at 1:11 PM, Szymon Janc <szymon.janc@tieto.com> wrote:
> > Cache is limited to DEVICES_CACHE_MAX. Devices are sorted with
> > timestamp so if cache is full olderst device is removed.
> > ---
> > 
> >  android/bluetooth.c | 69
> >  ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 55
> >  insertions(+), 14 deletions(-)
> > 
> > diff --git a/android/bluetooth.c b/android/bluetooth.c
> > index 8c91d87..df442a3 100644
> > --- a/android/bluetooth.c
> > +++ b/android/bluetooth.c
> > @@ -70,6 +70,8 @@
> > 
> >  /* Default discoverable timeout 120sec as in Android */
> >  #define DEFAULT_DISCOVERABLE_TIMEOUT 120
> > 
> > +#define DEVICES_CACHE_MAX 100
> 
> Is this being limited because Android UI cannot handle more than that?
> Or perhaps because our IPC/MTU cannot carry more than that? If the
> latter I believe we can actually calculate the maximun e.g. MTU / pdu
> size.

This is not related to Android UI nor MTU. This is just to limit max resources 
usage. Value is totally arbitrary. If device is not in cache some HAL 
functions might fail (notably set/get device property).

-- 
Szymon K. Janc
szymon.janc@gmail.com

  reply	other threads:[~2014-01-14 17:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14 11:11 [RFC 0/5] Remote device cache support Szymon Janc
2014-01-14 11:11 ` [RFC 1/5] android/bluetooth: Split devices list to devices and bonded_devices Szymon Janc
2014-01-14 15:42   ` Luiz Augusto von Dentz
2014-01-14 18:03     ` Szymon Janc
2014-01-14 11:11 ` [RFC 2/5] android/bluetooth: Use defines for settings and devices files paths Szymon Janc
2014-01-14 11:11 ` [RFC 3/5] android/bluetooth: Always store device info Szymon Janc
2014-01-14 11:11 ` [RFC 4/5] android/bluetooth: Add support for caching remote " Szymon Janc
2014-01-14 15:49   ` Luiz Augusto von Dentz
2014-01-14 17:55     ` Szymon Janc [this message]
2014-01-14 11:11 ` [RFC 5/5] android/bluetooth: Add support for loading caches devices from storage Szymon Janc

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=1877346.eJJvW3yP1x@athlon \
    --to=szymon.janc@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=szymon.janc@tieto.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