From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753671AbdEIUlk (ORCPT ); Tue, 9 May 2017 16:41:40 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:42098 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752379AbdEIUli (ORCPT ); Tue, 9 May 2017 16:41:38 -0400 Date: Tue, 9 May 2017 22:41:27 +0200 (CEST) From: Thomas Gleixner 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 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> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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