Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755252AbbFKUla (ORCPT ); Thu, 11 Jun 2015 16:41:30 -0400 Received: from mail-ig0-f174.google.com ([209.85.213.174]:35568 "EHLO mail-ig0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751767AbbFKUl2 (ORCPT ); Thu, 11 Jun 2015 16:41:28 -0400 MIME-Version: 1.0 In-Reply-To: References: <1434031637-9091-1-git-send-email-mingo@kernel.org> <1434031637-9091-8-git-send-email-mingo@kernel.org> Date: Thu, 11 Jun 2015 13:41:27 -0700 X-Google-Sender-Auth: Kkfo-d80p5VcEcrKyJxIVbeTBE4 Message-ID: Subject: Re: [PATCH 07/12] x86/virt/guest/xen: Remove use of pgd_list from the Xen guest code From: Linus Torvalds To: Ingo Molnar Cc: Linux Kernel Mailing List , linux-mml@vger.kernel.org, Andy Lutomirski , Andrew Morton , Denys Vlasenko , Brian Gerst , Peter Zijlstra , Borislav Petkov , "H. Peter Anvin" , Oleg Nesterov , Thomas Gleixner , Waiman Long Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 807 Lines: 22 On Thu, Jun 11, 2015 at 1:37 PM, Linus Torvalds wrote: > > Don't use "for_each_process_thread(g, p)". You only care about each > mm, and threads all share the same mm, so just do > > for_each_process(p) > > instead of iterating over all threads too. Hmm. I may be wrong. It strikes me that one of the group leaders might have exited but the subthreads live on. We'd see p->mm being NULL, even though the mm was originally in use. Ugh. So maybe the code really does need to iterate over all threads. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/