Re: [PATCH v2] memcg: Prevent memcg caches to be both OFF_SLAB & OBJFREELIST_SLAB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 7, 2016 at 11:28 AM, Christoph Lameter <cl@xxxxxxxxx> wrote:
> On Mon, 7 Nov 2016, Thomas Garnier wrote:
>
>> I am not sure that is possible. kmem_cache_create currently check for
>> possible alias, I assume that it goes against what memcg tries to do.
>
> What does aliasing have to do with this? The aliases must have the same
> flags otherwise the caches would not have been merged.
>

I assume there might be cases where the parent cache and the new memcg
cache are compatible for merge (same flags and size). We can bypass
that by adding SLAB_NEVER_MERGE but I am not sure what is the
consequence of that.

>> Separate the changes in two patches might make sense:
>>
>>  1) Fix the original bug by masking the flags passed to create_cache
>>  2) Add flags check in kmem_cache_create.
>>
>> Does it make sense?
>
> Sure.
>

Great, I will send both patches.

>> > I also want to make sure that there are no other callers that specify
>> > extraneou flags while we are at it.
>> I will review as many as I can but we might run into surprises (quick
>> boot on defconfig didn't show anything). That's why having two
>> different patches might be useful.
>
> These surprises can be caught later ... Just make sure that the core works
> fine with this. You cannot audit all drivers.
>

Okay, I will.



-- 
Thomas

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]