On 11/13/18 7:22 PM, Vlastimil Babka wrote:
> On 11/12/18 10:55 AM, David Laight wrote:
>> From: Vlastimil Babka [mailto:vba...@suse.cz]
>>> Sent: 09 November 2018 19:16
>> ...
>>> This? Not terribly elegant, but I don't see a nicer way right now...
>>
>> Maybe just have two copies of the function
On 11/13/18 7:22 PM, Vlastimil Babka wrote:
> On 11/12/18 10:55 AM, David Laight wrote:
>> From: Vlastimil Babka [mailto:vba...@suse.cz]
>>> Sent: 09 November 2018 19:16
>> ...
>>> This? Not terribly elegant, but I don't see a nicer way right now...
>>
>> Maybe just have two copies of the function
On 11/19/18 12:04 PM, Pavel Machek wrote:
> On Mon 2018-11-05 12:40:00, Bart Van Assche wrote:
>> This patch suppresses the following sparse warning:
>>
>> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>>
>> Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches")
>>
On 11/19/18 12:04 PM, Pavel Machek wrote:
> On Mon 2018-11-05 12:40:00, Bart Van Assche wrote:
>> This patch suppresses the following sparse warning:
>>
>> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>>
>> Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches")
>>
On Mon 2018-11-05 12:40:00, Bart Van Assche wrote:
> This patch suppresses the following sparse warning:
>
> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>
> Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches")
> Cc: Vlastimil Babka
> Cc: Mel Gorman
> Cc:
On Mon 2018-11-05 12:40:00, Bart Van Assche wrote:
> This patch suppresses the following sparse warning:
>
> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>
> Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches")
> Cc: Vlastimil Babka
> Cc: Mel Gorman
> Cc:
On 11/12/18 10:55 AM, David Laight wrote:
> From: Vlastimil Babka [mailto:vba...@suse.cz]
>> Sent: 09 November 2018 19:16
> ...
>> This? Not terribly elegant, but I don't see a nicer way right now...
>
> Maybe just have two copies of the function body?
>
> static __always_inline enum
On 11/12/18 10:55 AM, David Laight wrote:
> From: Vlastimil Babka [mailto:vba...@suse.cz]
>> Sent: 09 November 2018 19:16
> ...
>> This? Not terribly elegant, but I don't see a nicer way right now...
>
> Maybe just have two copies of the function body?
>
> static __always_inline enum
From: Vlastimil Babka [mailto:vba...@suse.cz]
> Sent: 09 November 2018 19:16
...
> This? Not terribly elegant, but I don't see a nicer way right now...
Maybe just have two copies of the function body?
static __always_inline enum kmalloc_cache_type kmalloc_type(gfp_t flags)
{
#ifndef
From: Vlastimil Babka [mailto:vba...@suse.cz]
> Sent: 09 November 2018 19:16
...
> This? Not terribly elegant, but I don't see a nicer way right now...
Maybe just have two copies of the function body?
static __always_inline enum kmalloc_cache_type kmalloc_type(gfp_t flags)
{
#ifndef
On 11/9/18 8:47 PM, Darryl T. Agostinelli wrote:
> On Fri, Nov 09, 2018 at 08:16:07PM +0100, Vlastimil Babka wrote:
>> On 11/9/18 8:00 PM, Andrew Morton wrote:
>>> On Fri, 9 Nov 2018 09:12:09 +0100 Vlastimil Babka wrote:
>>>
Multiple people have reported the following sparse warning:
On 11/9/18 8:47 PM, Darryl T. Agostinelli wrote:
> On Fri, Nov 09, 2018 at 08:16:07PM +0100, Vlastimil Babka wrote:
>> On 11/9/18 8:00 PM, Andrew Morton wrote:
>>> On Fri, 9 Nov 2018 09:12:09 +0100 Vlastimil Babka wrote:
>>>
Multiple people have reported the following sparse warning:
On Fri, Nov 09, 2018 at 08:16:07PM +0100, Vlastimil Babka wrote:
> On 11/9/18 8:00 PM, Andrew Morton wrote:
> > On Fri, 9 Nov 2018 09:12:09 +0100 Vlastimil Babka wrote:
> >
> >> Multiple people have reported the following sparse warning:
> >>
> >> ./include/linux/slab.h:332:43: warning: dubious:
On Fri, Nov 09, 2018 at 08:16:07PM +0100, Vlastimil Babka wrote:
> On 11/9/18 8:00 PM, Andrew Morton wrote:
> > On Fri, 9 Nov 2018 09:12:09 +0100 Vlastimil Babka wrote:
> >
> >> Multiple people have reported the following sparse warning:
> >>
> >> ./include/linux/slab.h:332:43: warning: dubious:
On 11/9/18 8:00 PM, Andrew Morton wrote:
> On Fri, 9 Nov 2018 09:12:09 +0100 Vlastimil Babka wrote:
>
>> Multiple people have reported the following sparse warning:
>>
>> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>>
>> The minimal fix would be to change the logical & to boolean &&,
On 11/9/18 8:00 PM, Andrew Morton wrote:
> On Fri, 9 Nov 2018 09:12:09 +0100 Vlastimil Babka wrote:
>
>> Multiple people have reported the following sparse warning:
>>
>> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>>
>> The minimal fix would be to change the logical & to boolean &&,
On Fri, 9 Nov 2018 09:12:09 +0100 Vlastimil Babka wrote:
> Multiple people have reported the following sparse warning:
>
> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>
> The minimal fix would be to change the logical & to boolean &&, which emits
> the
> same code, but Andrew has
On Fri, 9 Nov 2018 09:12:09 +0100 Vlastimil Babka wrote:
> Multiple people have reported the following sparse warning:
>
> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>
> The minimal fix would be to change the logical & to boolean &&, which emits
> the
> same code, but Andrew has
On 11/7/18 11:41 AM, David Laight wrote:
> From: Vlastimil Babka
>> Sent: 06 November 2018 12:51
>>
>> On 11/6/18 12:07 PM, David Laight wrote:
>>> From: Vlastimil Babka [mailto:vba...@suse.cz]
>>> 0020 :
>>> 20: 40 f6 c7 11 test $0x11,%dil
>>> 24: 75 03
On 11/7/18 11:41 AM, David Laight wrote:
> From: Vlastimil Babka
>> Sent: 06 November 2018 12:51
>>
>> On 11/6/18 12:07 PM, David Laight wrote:
>>> From: Vlastimil Babka [mailto:vba...@suse.cz]
>>> 0020 :
>>> 20: 40 f6 c7 11 test $0x11,%dil
>>> 24: 75 03
From: Vlastimil Babka
> Sent: 06 November 2018 12:51
>
> On 11/6/18 12:07 PM, David Laight wrote:
> > From: Vlastimil Babka [mailto:vba...@suse.cz]
> >> Sent: 06 November 2018 10:22
> > ...
> -return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM;
> +return
From: Vlastimil Babka
> Sent: 06 November 2018 12:51
>
> On 11/6/18 12:07 PM, David Laight wrote:
> > From: Vlastimil Babka [mailto:vba...@suse.cz]
> >> Sent: 06 November 2018 10:22
> > ...
> -return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM;
> +return
On Tue, Nov 6, 2018 at 9:48 AM Bart Van Assche wrote:
>
> On Tue, 2018-11-06 at 09:20 -0800, Alexander Duyck wrote:
> > On Mon, Nov 5, 2018 at 4:32 PM Bart Van Assche wrote:
> > >
> > > On Mon, 2018-11-05 at 16:11 -0800, Alexander Duyck wrote:
> > > > If we really don't care then why even bother
On Tue, Nov 6, 2018 at 9:48 AM Bart Van Assche wrote:
>
> On Tue, 2018-11-06 at 09:20 -0800, Alexander Duyck wrote:
> > On Mon, Nov 5, 2018 at 4:32 PM Bart Van Assche wrote:
> > >
> > > On Mon, 2018-11-05 at 16:11 -0800, Alexander Duyck wrote:
> > > > If we really don't care then why even bother
On Tue, 2018-11-06 at 09:20 -0800, Alexander Duyck wrote:
> On Mon, Nov 5, 2018 at 4:32 PM Bart Van Assche wrote:
> >
> > On Mon, 2018-11-05 at 16:11 -0800, Alexander Duyck wrote:
> > > If we really don't care then why even bother with the switch statement
> > > anyway? It seems like you could
On Tue, 2018-11-06 at 09:20 -0800, Alexander Duyck wrote:
> On Mon, Nov 5, 2018 at 4:32 PM Bart Van Assche wrote:
> >
> > On Mon, 2018-11-05 at 16:11 -0800, Alexander Duyck wrote:
> > > If we really don't care then why even bother with the switch statement
> > > anyway? It seems like you could
On Mon, Nov 5, 2018 at 4:32 PM Bart Van Assche wrote:
>
> On Mon, 2018-11-05 at 16:11 -0800, Alexander Duyck wrote:
> > If we really don't care then why even bother with the switch statement
> > anyway? It seems like you could just do one ternary operator and be
> > done with it. Basically all
On Mon, Nov 5, 2018 at 4:32 PM Bart Van Assche wrote:
>
> On Mon, 2018-11-05 at 16:11 -0800, Alexander Duyck wrote:
> > If we really don't care then why even bother with the switch statement
> > anyway? It seems like you could just do one ternary operator and be
> > done with it. Basically all
On 11/6/18 12:07 PM, David Laight wrote:
> From: Vlastimil Babka [mailto:vba...@suse.cz]
>> Sent: 06 November 2018 10:22
> ...
- return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM;
+ return type_dma + is_reclaimable * !is_dma * KMALLOC_RECLAIM;
>>>
>>> ISTM that changing
On 11/6/18 12:07 PM, David Laight wrote:
> From: Vlastimil Babka [mailto:vba...@suse.cz]
>> Sent: 06 November 2018 10:22
> ...
- return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM;
+ return type_dma + is_reclaimable * !is_dma * KMALLOC_RECLAIM;
>>>
>>> ISTM that changing
From: Vlastimil Babka [mailto:vba...@suse.cz]
> Sent: 06 November 2018 10:22
...
> >> - return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM;
> >> + return type_dma + is_reclaimable * !is_dma * KMALLOC_RECLAIM;
> >
> > ISTM that changing is_dma and is_reclaimable from int to bool will
From: Vlastimil Babka [mailto:vba...@suse.cz]
> Sent: 06 November 2018 10:22
...
> >> - return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM;
> >> + return type_dma + is_reclaimable * !is_dma * KMALLOC_RECLAIM;
> >
> > ISTM that changing is_dma and is_reclaimable from int to bool will
On 11/6/18 11:08 AM, David Laight wrote:
> From: Bart Van Assche
>> Sent: 05 November 2018 20:40
>>
>> This patch suppresses the following sparse warning:
>>
>> ./include/linux/slab.h:332:43: warning: dubious: x & !y
BTW, I wonder why the warnings appeared only now, after maybe months in
On 11/6/18 11:08 AM, David Laight wrote:
> From: Bart Van Assche
>> Sent: 05 November 2018 20:40
>>
>> This patch suppresses the following sparse warning:
>>
>> ./include/linux/slab.h:332:43: warning: dubious: x & !y
BTW, I wonder why the warnings appeared only now, after maybe months in
From: Bart Van Assche
> Sent: 05 November 2018 20:40
>
> This patch suppresses the following sparse warning:
>
> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>
> Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches")
> Cc: Vlastimil Babka
> Cc: Mel Gorman
> Cc:
From: Bart Van Assche
> Sent: 05 November 2018 20:40
>
> This patch suppresses the following sparse warning:
>
> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>
> Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches")
> Cc: Vlastimil Babka
> Cc: Mel Gorman
> Cc:
> On Nov 5, 2018, at 14:13, Andrew Morton wrote:
>
>> On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche
>> wrote:
>> -return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM;
>> +return type_dma + is_reclaimable * !is_dma * KMALLOC_RECLAIM;
>> }
>>
>> /*
>
> I suppose so.
> On Nov 5, 2018, at 14:13, Andrew Morton wrote:
>
>> On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche
>> wrote:
>> -return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM;
>> +return type_dma + is_reclaimable * !is_dma * KMALLOC_RECLAIM;
>> }
>>
>> /*
>
> I suppose so.
On 11/5/18 9:40 PM, Bart Van Assche wrote:
> This patch suppresses the following sparse warning:
>
> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>
> Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches")
> Cc: Vlastimil Babka
> Cc: Mel Gorman
> Cc: Christoph
On 11/5/18 9:40 PM, Bart Van Assche wrote:
> This patch suppresses the following sparse warning:
>
> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>
> Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches")
> Cc: Vlastimil Babka
> Cc: Mel Gorman
> Cc: Christoph
On Mon, 2018-11-05 at 16:11 -0800, Alexander Duyck wrote:
> If we really don't care then why even bother with the switch statement
> anyway? It seems like you could just do one ternary operator and be
> done with it. Basically all you need is:
> return (defined(CONFIG_ZONE_DMA) && (flags &
On Mon, 2018-11-05 at 16:11 -0800, Alexander Duyck wrote:
> If we really don't care then why even bother with the switch statement
> anyway? It seems like you could just do one ternary operator and be
> done with it. Basically all you need is:
> return (defined(CONFIG_ZONE_DMA) && (flags &
On Mon, Nov 5, 2018 at 4:01 PM Bart Van Assche wrote:
>
> On Mon, 2018-11-05 at 14:48 -0800, Alexander Duyck wrote:
> > On Mon, Nov 5, 2018 at 2:41 PM Bart Van Assche wrote:
> > > How about this version, still untested? My compiler is able to evaluate
> > > the switch expression if the argument
On Mon, Nov 5, 2018 at 4:01 PM Bart Van Assche wrote:
>
> On Mon, 2018-11-05 at 14:48 -0800, Alexander Duyck wrote:
> > On Mon, Nov 5, 2018 at 2:41 PM Bart Van Assche wrote:
> > > How about this version, still untested? My compiler is able to evaluate
> > > the switch expression if the argument
On Mon, 2018-11-05 at 14:48 -0800, Alexander Duyck wrote:
> On Mon, Nov 5, 2018 at 2:41 PM Bart Van Assche wrote:
> > How about this version, still untested? My compiler is able to evaluate
> > the switch expression if the argument is constant.
> >
> > static __always_inline enum
On Mon, 2018-11-05 at 14:48 -0800, Alexander Duyck wrote:
> On Mon, Nov 5, 2018 at 2:41 PM Bart Van Assche wrote:
> > How about this version, still untested? My compiler is able to evaluate
> > the switch expression if the argument is constant.
> >
> > static __always_inline enum
On Mon, Nov 5, 2018 at 2:41 PM Bart Van Assche wrote:
>
> On Mon, 2018-11-05 at 23:14 +0100, Rasmus Villemoes wrote:
> > Won't that pessimize the cases where gfp is a constant to actually do
> > the table lookup, and add 16 bytes to every translation unit?
> >
> > Another option is to add a fake
On Mon, Nov 5, 2018 at 2:41 PM Bart Van Assche wrote:
>
> On Mon, 2018-11-05 at 23:14 +0100, Rasmus Villemoes wrote:
> > Won't that pessimize the cases where gfp is a constant to actually do
> > the table lookup, and add 16 bytes to every translation unit?
> >
> > Another option is to add a fake
On Mon, 2018-11-05 at 23:14 +0100, Rasmus Villemoes wrote:
> Won't that pessimize the cases where gfp is a constant to actually do
> the table lookup, and add 16 bytes to every translation unit?
>
> Another option is to add a fake KMALLOC_DMA_RECLAIM so the
> kmalloc_caches[] array has size 4,
On Mon, 2018-11-05 at 23:14 +0100, Rasmus Villemoes wrote:
> Won't that pessimize the cases where gfp is a constant to actually do
> the table lookup, and add 16 bytes to every translation unit?
>
> Another option is to add a fake KMALLOC_DMA_RECLAIM so the
> kmalloc_caches[] array has size 4,
On 2018-11-05 22:48, Bart Van Assche wrote:
> On Mon, 2018-11-05 at 13:13 -0800, Andrew Morton wrote:
>> On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche
>> wrote:
>>
>>> This patch suppresses the following sparse warning:
>>>
>>> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>>>
>>>
On 2018-11-05 22:48, Bart Van Assche wrote:
> On Mon, 2018-11-05 at 13:13 -0800, Andrew Morton wrote:
>> On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche
>> wrote:
>>
>>> This patch suppresses the following sparse warning:
>>>
>>> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>>>
>>>
On Mon, 2018-11-05 at 13:13 -0800, Andrew Morton wrote:
> On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche wrote:
>
> > This patch suppresses the following sparse warning:
> >
> > ./include/linux/slab.h:332:43: warning: dubious: x & !y
> >
> > ...
> >
> > --- a/include/linux/slab.h
> > +++
On Mon, 2018-11-05 at 13:13 -0800, Andrew Morton wrote:
> On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche wrote:
>
> > This patch suppresses the following sparse warning:
> >
> > ./include/linux/slab.h:332:43: warning: dubious: x & !y
> >
> > ...
> >
> > --- a/include/linux/slab.h
> > +++
On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche wrote:
> This patch suppresses the following sparse warning:
>
> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>
> ...
>
> --- a/include/linux/slab.h
> +++ b/include/linux/slab.h
> @@ -329,7 +329,7 @@ static __always_inline enum
On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche wrote:
> This patch suppresses the following sparse warning:
>
> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>
> ...
>
> --- a/include/linux/slab.h
> +++ b/include/linux/slab.h
> @@ -329,7 +329,7 @@ static __always_inline enum
This patch suppresses the following sparse warning:
./include/linux/slab.h:332:43: warning: dubious: x & !y
Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches")
Cc: Vlastimil Babka
Cc: Mel Gorman
Cc: Christoph Lameter
Cc: Roman Gushchin
Signed-off-by: Bart Van Assche
This patch suppresses the following sparse warning:
./include/linux/slab.h:332:43: warning: dubious: x & !y
Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches")
Cc: Vlastimil Babka
Cc: Mel Gorman
Cc: Christoph Lameter
Cc: Roman Gushchin
Signed-off-by: Bart Van Assche
58 matches
Mail list logo