From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f198.google.com (mail-wr0-f198.google.com [209.85.128.198]) by kanga.kvack.org (Postfix) with ESMTP id CF8A3280757 for ; Tue, 9 May 2017 16:41:41 -0400 (EDT) Received: by mail-wr0-f198.google.com with SMTP id w50so3051342wrc.4 for ; Tue, 09 May 2017 13:41:41 -0700 (PDT) Received: from Galois.linutronix.de (Galois.linutronix.de. [2a01:7a0:2:106d:700::1]) by mx.google.com with ESMTPS id q11si1021509wra.35.2017.05.09.13.41.40 for (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 09 May 2017 13:41:40 -0700 (PDT) Date: Tue, 9 May 2017 22:41:27 +0200 (CEST) From: Thomas Gleixner Subject: Re: [RFC 09/10] x86/mm: Rework lazy TLB to track the actual loaded mm In-Reply-To: <1a124281c99741606f1789140f9805beebb119da.1494160201.git.luto@kernel.org> Message-ID: References: <1a124281c99741606f1789140f9805beebb119da.1494160201.git.luto@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Andy Lutomirski Cc: X86 ML , "linux-kernel@vger.kernel.org" , Borislav Petkov , Linus Torvalds , Andrew Morton , Mel Gorman , "linux-mm@kvack.org" , Rik van Riel , Dave Hansen , Nadav Amit , Michal Hocko , Arjan van de Ven On Sun, 7 May 2017, Andy Lutomirski wrote: > /* context.lock is held for us, so we don't need any locking. */ > static void flush_ldt(void *current_mm) > { > + struct mm_struct *mm = current_mm; > mm_context_t *pc; > > - if (current->active_mm != current_mm) > + if (this_cpu_read(cpu_tlbstate.loaded_mm) != current_mm) While functional correct, this really should compare against 'mm'. > return; > > - pc = ¤t->active_mm->context; > + pc = &mm->context; Thanks, tglx -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org