e waiting for proc work can directly
receive work from another thread, and no work is allowed to be queued
on such a thread without waking up the thread. This patch also enforces
that a thread is not waiting for proc work when a work is directly
enqueued to its todo list.
Acked-by: Arve Hjønnevåg
Use rate-limited debug messages where userspace can trigger
excessive log spams.
Acked-by: Arve Hjønnevåg
Signed-off-by: Sherry Yang
---
v2: rebase onto char-misc-next to resolve include order
difference from master
drivers/android/binder.c | 5 +++--
drivers/android/binder_alloc.c
Add extra_buffers_size to the binder_transaction_alloc_buf tracepoint.
Acked-by: Arve Hjønnevåg
Signed-off-by: Sherry Yang
---
drivers/android/binder_trace.h | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/android/binder_trace.h b/drivers/android
Use rate-limited debug messages where userspace can trigger
excessive log spams.
Acked-by: Arve Hjønnevåg
Signed-off-by: Sherry Yang
---
drivers/android/binder.c | 5 +++--
drivers/android/binder_alloc.c | 41 +-
2 files changed, 29 insertions(+), 17
, 2017 at 8:29 AM, Tetsuo Handa
<penguin-ker...@i-love.sakura.ne.jp> wrote:
> Both list_lru_init() and register_shrinker() might return an error.
>
> Signed-off-by: Tetsuo Handa <penguin-ker...@i-love.sakura.ne.jp>
> Cc: Sherry Yang <sher...@android.com>
Hjønnevåg <a...@android.com>
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder_alloc.c | 22 +-
drivers/android/binder_alloc.h | 1 -
2 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/drivers/android/binder_alloc.c b/dri
Don't access next->data in kernel debug message when the
next buffer is null.
Acked-by: Arve Hjønnevåg <a...@android.com>
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/
binder_shrinker struct is not used anywhere outside of
binder_alloc.c and should be static.
Acked-by: Arve Hjønnevåg <a...@android.com>
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --g
The vma argument in update_page_range is no longer
used after 74310e06 ("android: binder: Move buffer
out of area shared with user space"), since mmap_handler
no longer calls update_page_range with a vma.
Acked-by: Arve Hjønnevåg <a...@android.com>
Signed-off-by: Sherry Yang <
binder_shrinker struct is not used anywhere outside of
binder_alloc.c and should be static.
Acked-by: Arve Hjønnevåg <a...@android.com>
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --g
Don't access next->data in kernel debug message when the
next buffer is null.
Acked-by: Arve Hjønnevåg <a...@android.com>
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/
The vma argument in update_page_range is no longer
used after 74310e06 ("android: binder: Move buffer
out of area shared with user space"), since mmap_handler
no longer calls update_page_range with a vma.
Acked-by: Arve Hjønnevåg <a...@android.com>
Signed-off-by: Sherry Yang <
Hjønnevåg <a...@android.com>
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder_alloc.c | 22 +-
drivers/android/binder_alloc.h | 1 -
2 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/drivers/android/binder_alloc.c b/dri
m_reap_task and exit_mmap run concurrently").
Fixes: f2517eb76f1f2 ("android: binder: Add global lru shrinker to binder")
Reported-by: Kyle Yan <k...@codeaurora.org>
Acked-by: Arve Hjønnevåg <a...@android.com>
Signed-off-by: Sherry Yang <sher...@android.com>
---
Chang
is
not enabled.
Thanks,
Sherry
On Sun, Sep 10, 2017 at 7:48 AM, Geert Uytterhoeven
<ge...@linux-m68k.org> wrote:
> Hi Sherry,
>
> On Wed, Aug 16, 2017 at 2:25 AM, Sherry Yang <sher...@android.com> wrote:
>> binder_alloc_selftest tests that alloc_new_buf handles page allocation a
ction called from invalid context"
errors when CONFIG_DEBUG_ATOMIC_SLEEP is enabled.
Fixes: f2517eb76f1f2 ("android: binder: Add global lru shrinker to binder")
Reported-by: Kyle Yan <k...@codeaurora.org>
Acked-by: Arve Hjønnevåg <a...@android.com>
Signed-off-by:
Add the number of active, lru, and free pages for
each binder process in binder stats
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder.c | 2 ++
drivers/android/binder_alloc.c | 28
drivers/android/binder_alloc.h | 2 ++
3
On Wed, Aug 30, 2017 at 9:28 PM, Greg Kroah-Hartman
wrote:
> Ok, exactly what git commit ids should I revert from the tree? But
> really, a fix would be easier at this point :)
I sent a fixup patch as a separate reply to this email. Please also
apply [patch v3 6/6]
Fix crash introduced by 74310e06be4d74dcf67cd108366710dee5c576d5
(android: binder: Move buffer out of area shared with user space)
when close is called after open without mmap in between.
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder_alloc.c | 2 +-
1 file c
On Tue, Aug 29, 2017 at 11:07 PM, Greg Kroah-Hartman
<gre...@linuxfoundation.org> wrote:
> On Tue, Aug 29, 2017 at 05:46:57PM -0700, Sherry Yang wrote:
>> Use helper functions buffer_next and buffer_prev instead
>> of list_entry to get the next and previous buffers.
>&g
ers initialization from mmap to init since it's
now used even when mmap failed or was not called.
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder_alloc.c | 146 +++-
drivers/android/binder_alloc.h | 2 +-
driver
c selftest to work with the shrinker change.
Test: Run memory intensive applications (Chrome and Camera)
to trigger shrinker callbacks. Binder frees memory as expected.
Test: Run binderThroughputTest with high memory pressure
option enabled.
Signed-off-by: Sherry Yang <sher...@android.com&
Add the number of active, lru, and free pages for
each binder process in binder stats
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder.c | 2 ++
drivers/android/binder_alloc.c | 28
drivers/android/binder_alloc.h | 2 ++
3
the device with ANDROID_BINDER_IPC_SELFTEST config option
enabled. Allocator selftest passes.
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/Kconfig | 10 ++
drivers/android/Makefile| 1 +
drivers/android/binder.c
Add tracepoints in binder transaction allocator to
record lru hits and alloc/free page.
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder_alloc.c | 27 +++--
drivers/android/binder_trace.h | 55 ++
2 files c
Use helper functions buffer_next and buffer_prev instead
of list_entry to get the next and previous buffers.
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder_alloc.c | 24 +++-
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/d
This patch set moves internal kernel data in the binder driver
out of mmap regions that is readable by user space. A shrinker
is added to the driver to dynamically manage the memory used
by binder transactions and only free pages when the system is
under memory pressure. This patch set also adds
c selftest to work with the shrinker change.
Test: Run memory intensive applications (Chrome and Camera)
to trigger shrinker callbacks. Binder frees memory as expected.
Test: Run binderThroughputTest with high memory pressure
option enabled.
Signed-off-by: Sherry Yang <sher...@android.com&
Add tracepoints in binder transaction allocator to
record lru hits and alloc/free page.
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder_alloc.c | 27 +++--
drivers/android/binder_trace.h | 55 ++
2 files c
Binder driver allocates buffer meta data in a region that is mapped
in user space. These meta data contain pointers in the kernel.
This patch allocates buffer meta data on the kernel heap that is
not mapped in user space, and uses a pointer to refer to the data mapped.
Signed-off-by: Sherry Yang
the device with ANDROID_BINDER_IPC_SELFTEST config option
enabled. Allocator selftest passes.
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/Kconfig | 10 ++
drivers/android/Makefile| 1 +
drivers/android/binder.c
Use helper functions buffer_next and buffer_prev instead
of list_entry to get the next and previous buffers.
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder_alloc.c | 24 +++-
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/d
Change-Id: Ie2a446ad9907f0d306fd1b8e6d79d87e48826ce2
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder_alloc.c | 24 +++-
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_a
Add tracepoints in binder transaction allocator to
record lru hits and alloc/free page.
Change-Id: I7715f943c57d6172c35bdff8298d8c5aef24a51a
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder_alloc.c | 27 +++--
drivers/android/binder_trace.
: Ie19d2393a5015d9ee8bc26c41ce27e6eaa6e52fb
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder_alloc.c | 144 +++-
drivers/android/binder_alloc.h | 2 +-
drivers/android/binder_alloc_selftest.c | 11 ++-
3 files changed, 90 insertions(
the device with ANDROID_BINDER_IPC_SELFTEST config option
enabled. Allocator selftest passes.
Change-Id: I9064f60c85b1e0389c88e927e2b147ec92cae0d1
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/Kconfig | 10 ++
drivers/android/Makefile
Signed-off-by: Sherry Yang <sher...@android.com>
---
drivers/android/binder.c| 2 +
drivers/android/binder_alloc.c | 172 +++-
drivers/android/binder_alloc.h | 23 -
drivers/android/binder_alloc_selftest.c | 68 ++---
37 matches
Mail list logo