[PATCH 7/9] mm, slub: introduce kmem_cache_debug_flags()

2020-06-10 Thread Vlastimil Babka
There are few places that call kmem_cache_debug(s) (which tests if any of debug flags are enabled for a cache) immediatelly followed by a test for a specific flag. The compiler can probably eliminate the extra check, but we can make the code nicer by introducing kmem_cache_debug_flags() that works

Re: [PATCH 7/9] mm, slub: introduce kmem_cache_debug_flags()

2020-06-18 Thread Roman Gushchin
On Thu, Jun 18, 2020 at 10:37:07AM +0200, Vlastimil Babka wrote: > On 6/10/20 6:31 PM, Vlastimil Babka wrote: > > There are few places that call kmem_cache_debug(s) (which tests if any of > > debug > > flags are enabled for a cache) immediatelly followed by a test for a > > specific > > flag. The

Re: [PATCH 7/9] mm, slub: introduce kmem_cache_debug_flags()

2020-06-18 Thread Kees Cook
On Thu, Jun 18, 2020 at 10:37:07AM +0200, Vlastimil Babka wrote: > On 6/10/20 6:31 PM, Vlastimil Babka wrote: > > There are few places that call kmem_cache_debug(s) (which tests if any of > > debug > > flags are enabled for a cache) immediatelly followed by a test for a > > specific > > flag. The

Re: [PATCH 7/9] mm, slub: introduce kmem_cache_debug_flags()

2020-06-10 Thread Roman Gushchin
On Wed, Jun 10, 2020 at 06:31:33PM +0200, Vlastimil Babka wrote: > There are few places that call kmem_cache_debug(s) (which tests if any of > debug > flags are enabled for a cache) immediatelly followed by a test for a specific > flag. The compiler can probably eliminate the extra check, but we c

Re: [PATCH 7/9] mm, slub: introduce kmem_cache_debug_flags()

2020-06-17 Thread Kees Cook
On Wed, Jun 10, 2020 at 06:31:33PM +0200, Vlastimil Babka wrote: > There are few places that call kmem_cache_debug(s) (which tests if any of > debug > flags are enabled for a cache) immediatelly followed by a test for a specific > flag. The compiler can probably eliminate the extra check, but we c

Re: [PATCH 7/9] mm, slub: introduce kmem_cache_debug_flags()

2020-06-18 Thread Vlastimil Babka
On 6/17/20 7:56 PM, Kees Cook wrote: > On Wed, Jun 10, 2020 at 06:31:33PM +0200, Vlastimil Babka wrote: >> There are few places that call kmem_cache_debug(s) (which tests if any of >> debug >> flags are enabled for a cache) immediatelly followed by a test for a specific >> flag. The compiler can p

Re: [PATCH 7/9] mm, slub: introduce kmem_cache_debug_flags()

2020-06-18 Thread Vlastimil Babka
On 6/10/20 6:31 PM, Vlastimil Babka wrote: > There are few places that call kmem_cache_debug(s) (which tests if any of > debug > flags are enabled for a cache) immediatelly followed by a test for a specific > flag. The compiler can probably eliminate the extra check, but we can make the > code nic