kdbus: increase kdbus receive pool size to 16M 27/69527/2 accepted/tizen/common/20160517.173904 accepted/tizen/ivi/20160517.032312 accepted/tizen/mobile/20160517.032335 accepted/tizen/tv/20160517.032329 accepted/tizen/wearable/20160517.032352 submit/tizen/20160516.081330
authorLukasz Skalski <l.skalski@samsung.com>
Fri, 13 May 2016 14:08:36 +0000 (16:08 +0200)
committerLukasz Skalski <l.skalski@samsung.com>
Fri, 13 May 2016 15:10:50 +0000 (17:10 +0200)
commitd753908d1b49eb7caea63d738268966218fd7b7e
tree8cfc8513054af5f88a847a5b9cb43bae2de44211
parent8e0a7f8e6e5c525a8882e7efa270f678d00971e3
kdbus: increase kdbus receive pool size to 16M

Current kdbus receive pool size is too small (only 2MB - in GLib
we have 16MB). Due to quite specific 'pool layout' in kdbus module,
2MB was not enough for 512kB messages - according to kdbus docs:

"50% of a pool is always owned by the connection. It is reserved for
kernel queries, handling received messages and other tasks that are
under control of the pool owner. The other 50% of the pool are used
as incoming queue.
As we optionally support user-space based policies, we need fair
allocation schemes. Furthermore, resource utilization should be
maximized, so only minimal resources stay reserved. However, we need
to adapt to a dynamic number of users, as we cannot know how many
users will talk to a connection. Therefore, the current allocation
works like this:
We limit the number of bytes in a destination's pool per sending
user. The space available for a user is 33% of the unused pool space
(whereas the space used by the user itself is also treated as
'unused'). This way, we favor users coming first, but keep enough
pool space available for any following users. Given that messages are
dequeued in FIFO order, this should balance nicely if the number of
users grows. At the same time, this algorithm guarantees that the
space available to a connection is reduced dynamically, the more
concurrent users talk to a connection."

Change-Id: Iffddc018f0d8bf08451d12d305c8d392ed3e1f55
dbus/dbus-transport-kdbus.c