From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933801AbbI2Ipa (ORCPT ); Tue, 29 Sep 2015 04:45:30 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:35385 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933492AbbI2Io1 (ORCPT ); Tue, 29 Sep 2015 04:44:27 -0400 Date: Tue, 29 Sep 2015 10:44:22 +0200 From: Ingo Molnar To: Linus Torvalds Cc: Linux Kernel Mailing List , linux-mm , Andy Lutomirski , Andrew Morton , Denys Vlasenko , Brian Gerst , Peter Zijlstra , Borislav Petkov , "H. Peter Anvin" , Oleg Nesterov , Waiman Long , Thomas Gleixner Subject: Re: [PATCH 06/11] x86/virt/guest/xen: Remove use of pgd_list from the Xen guest code Message-ID: <20150929084422.GB332@gmail.com> References: <1442903021-3893-1-git-send-email-mingo@kernel.org> <1442903021-3893-7-git-send-email-mingo@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Linus Torvalds wrote: > On Mon, Sep 21, 2015 at 11:23 PM, Ingo Molnar wrote: > > xen_mm_pin_all()/unpin_all() are used to implement full guest instance > > suspend/restore. It's a stop-all method that needs to iterate through > > all allocated pgds in the system to fix them up for Xen's use. > > And _this_ is why I'd reall ylike that "for_each_mm()" helper. > > Yeah, yeah, maybe it would require syntax like > > for_each_mm (tsk, mm) { > ... > } end_for_each_mm(mm); > > to do variable allocation things or cleanups (ie "end_for_each_mm()" might drop > the task lock etc), but wouldn't that still be better than this complex > boilerplate thing? Yeah, agreed absolutely. Thanks, Ingo