]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
gpu: nvgpu: Fix OOM case for buddy allocator
authorAlex Waterman <alexw@nvidia.com>
Wed, 20 May 2015 19:23:01 +0000 (12:23 -0700)
committerTerje Bergstrom <tbergstrom@nvidia.com>
Thu, 21 May 2015 22:36:59 +0000 (15:36 -0700)
commitf3548e67f435975238b55ac152871dcd60a1a907
tree46c2baab3317dec47f41f2cbc5e0f165cc9c2d3a
parent3518c8fd11f04fd2583c5fddad833ee8c48d7277
gpu: nvgpu: Fix OOM case for buddy allocator

The allocator could attempt to use a buddy list for an order larger than
the max order when all the valid buddy lists were empty. This patch
ensures that when looking for a particular order buddy that the passed
order is valid.

Also handle the prints in the no-mem case a litle differently. Only print
and update alloc info when there was a successful allocation.

Lastly print hex numbers for the allocator stats printing function.

Change-Id: If289f3e8925e236e3b7d84206a75bd45a14082a1
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/745071
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
drivers/gpu/nvgpu/gk20a/gk20a_allocator.c