Re: [PATCH v2 03/10] x86/mm: Give each mm TLB flush generation a unique ID

From: Andy Lutomirski
Date: Wed Jun 14 2017 - 13:16:47 EST


On Wed, Jun 14, 2017 at 8:54 AM, Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
> On 06/13/2017 09:56 PM, Andy Lutomirski wrote:
>> typedef struct {
>> + /*
>> + * ctx_id uniquely identifies this mm_struct. A ctx_id will never
>> + * be reused, and zero is not a valid ctx_id.
>> + */
>> + u64 ctx_id;
>
> Ahh, and you need this because an mm itself might get reused by being
> freed and reallocated?

Exactly. I didn't want to have to zap the data structures on each CPU
every time an mm is freed.