Commit Graph

17 Commits

Author SHA1 Message Date
Rebecca Schultz Zavin
c0c1092183 Modify the binder to request 1M - 2 pages instead of 1M. The backing store
in the kernel requires a guard page, so 1M allocations fragment memory very
badly.  Subtracting a couple of pages so that they fit in a power of
two allows the kernel to make more efficient use of its virtual address space.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2009-11-12 16:31:12 -08:00
Christopher Tate
07d69893e1 Reset binder service threads' cgroup/priority after command completion
To prevent buggy command implementations from poisoning binder threads'
scheduling class & priority for future command execution, we now reset the
cgroup and thread priority to foreground/normal when a binder service thread
finishes executing the designated command.

Change-Id: Ibc0ab2485751453f6dc96fdb4eb877fd02796e3f
2009-11-08 14:29:02 -08:00
Evan Millar
6dfe8f1ffa Revert jparks code from IPCThreadState. 2009-11-06 11:25:23 -08:00
Jason Parks
b5c4135333 When a thread is about to be put back onto the thread pool ensure that it is in the foreground cgroup. 2009-11-04 14:25:26 -08:00
Jason Parks
dcd3958c50 Add a warning when we leave threads in the binder thread pool in the background scheduling group. 2009-11-03 13:10:15 -08:00
Dima Zavin
d7f53e1945 libbinder: MemoryHeapPmem: honor the NO_CACHING flag when creating a client heap
Change-Id: Ia7beb800f5a24beaa4b7f3032b486d4ed1991b23
Signed-off-by: Dima Zavin <dima@android.com>
2009-11-02 16:36:45 -08:00
Iliyan Malchev
0db1a8931b libbinder: add a NO_CACHING flag to MemoryHeapBase
The NO_CACHING flag translates to opening a memory region with O_SYNC.

Signed-off-by: Iliyan Malchev <malchev@google.com>
2009-10-30 18:35:47 -07:00
Benny Wong
d4851d74ac Add offset handling in MemoryHeapBase class 2009-08-20 03:55:20 -07:00
Andreas Huber
84a6d041e2 Support for marshalling pointers / intptr_t in Parcel.
Some refactoring to eliminate code duplication in Parcel implementation.
2009-08-17 15:31:25 -07:00
Mathias Agopian
1d0a95b12a don't crash in Parcel when given a null (and therfore invalid) native_handle_t 2009-07-31 16:18:16 -07:00
Marco Nelissen
d43b194b69 Instead of using -1 for pid and uid in the simulator, and then having
to special-case the simulator case all over the framework, just use
getuid and getpid, and intercept those in the simulator wrapper.
2009-07-17 10:48:09 -07:00
Mathias Agopian
375f56363a new Permission class used to improve permission checks speed (by caching results) 2009-06-15 21:56:51 -07:00
Mathias Agopian
83c0446f27 some work to try to reduce the code size of some native libraries
- make sure that all binder Bn classes define a ctor and dtor in their respective library.
  This avoids duplication of the ctor/dtor in libraries where these objects are instantiated.
  This is also cleaner, should we want these ctor/dtor to do something one day.

- same change as above for some Bp classes and various other non-binder classes

- moved the definition of CHECK_INTERFACE() in IInterface.h instead of having it everywhere.

- improved the CHECK_INTERFACE() macro so it calls a single method in Parcel, instead of inlining its code everywhere

- IBinder::getInterfaceDescriptor() now returns a "const String16&" instead of String16, which saves calls to String16 and ~String16

- implemented a cache for BpBinder::getInterfaceDescriptor(), since this does an IPC. HOWEVER, this method never seems to be called.
  The cache makes BpBinder bigger, so we need to figure out if we need this method at all.
2009-05-26 16:12:20 -07:00
Android (Google) Code Review
4e97f8c62f am d50a458b: Merge change 2351 into donut
Merge commit 'd50a458bb291801ab9fdc119301bc7b84b42a6e3'

* commit 'd50a458bb291801ab9fdc119301bc7b84b42a6e3':
  Fix a major bug in Bundle when unparcelling from AIDL.
2009-05-22 14:53:18 -07:00
Mathias Agopian
a47f02afb1 change 2115 wasn't merged properly into master. this fixes that.
Merge change 2115 into donut

* changes:
  bring the native_handle stuff back from master_gl

Conflicts:

	libs/binder/Parcel.cpp
2009-05-21 16:29:38 -07:00
Mathias Agopian
c5b2c0bf80 move libbinder's header files under includes/binder 2009-05-20 12:55:03 -07:00
Mathias Agopian
208059f67e checkpoint: split libutils into libutils + libbinder 2009-05-20 12:55:02 -07:00