1. 28 8月, 2017 3 次提交
    • S
      android: binder: Add global lru shrinker to binder · f2517eb7
      Sherry Yang 提交于
      Hold on to the pages allocated and mapped for transaction
      buffers until the system is under memory pressure. When
      that happens, use linux shrinker to free pages. Without
      using shrinker, patch "android: binder: Move buffer out
      of area shared with user space" will cause a significant
      slow down for small transactions that fit into the first
      page because free list buffer header used to be inlined
      with buffer data.
      
      In addition to prevent the performance regression for
      small transactions, this patch improves the performance
      for transactions that take up more than one page.
      
      Modify alloc 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: NSherry Yang <sherryy@android.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f2517eb7
    • S
      android: binder: Move buffer out of area shared with user space · 74310e06
      Sherry Yang 提交于
      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: NSherry Yang <sherryy@android.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      74310e06
    • S
      android: binder: Add allocator selftest · 4175e2b4
      Sherry Yang 提交于
      binder_alloc_selftest tests that alloc_new_buf handles page allocation and
      deallocation properly when allocate and free buffers. The test allocates 5
      buffers of various sizes to cover all possible page alignment cases, and
      frees the buffers using a list of exhaustive freeing order.
      
      Test: boot the device with ANDROID_BINDER_IPC_SELFTEST config option
      enabled. Allocator selftest passes.
      Signed-off-by: NSherry Yang <sherryy@android.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4175e2b4
  2. 17 7月, 2017 2 次提交