lkml.org 
[lkml]   [2013]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm, slab: Drop unnecessary slabp->inuse < cachep->num test
On Tue, 2 Jul 2013, Zhang Yanfei wrote:

> From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
>
> In function cache_alloc_refill, we have used BUG_ON to ensure
> that slabp->inuse is less than cachep->num before the while
> test. And in the while body, we do not change the value of
> slabp->inuse and cachep->num, so it is not necessary to test
> if slabp->inuse < cachep->num test for every loop.

The body calls slab_get_obj which changes slabp->inuse!


\
 
 \ /
  Last update: 2013-07-01 21:01    [W:0.030 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site