Received: by 10.223.185.116 with SMTP id b49csp2313682wrg; Thu, 22 Feb 2018 11:38:10 -0800 (PST) X-Google-Smtp-Source: AH8x226SeaCxhp3bId84iweotIFIdBv9hxJ5S5zEBW8lUSys/pTCXuWrKxQCMdRNuFlcJsppFvg3 X-Received: by 10.101.87.199 with SMTP id q7mr6575848pgr.215.1519328290710; Thu, 22 Feb 2018 11:38:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519328290; cv=none; d=google.com; s=arc-20160816; b=lUaJLnOAp6SoqHuFCWBf/wj9U5maa8v9sV81dBULxnySJ3/yIYfgExjKk9lpypu6GO HaFPrvpMsMkFdp+N+XJJVwbvDuWU4ppcb0Zxqis0xd7T8svXeS0RggrGv4HTK43zURUI uMUpmzkx2jgzqoQClEoFUNg8UtWlTFk4bBPeuKi3imGMn/nfyNYMP2NM8TpIBLaOtTbg E91TKfexAZwJt1iGNrifMcM7CyEGzC9cAY59cvRaaNJQYkoPXylXpXNKbxu2QhSKRBC2 BuklJhhQEWZxcleIS1v1kJoVs+DRmlB01bMIckgNp/Oty8ZwFStNYwETKrquf3OnmYqX yv6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:cc:references:to:subject:arc-authentication-results; bh=cZu5D375xVJPjnpedS92zrmRXpkS8F9zbD4SLhVqV9o=; b=bmGK6vwKHjfTWYSldRv1YxNdcLKV1SDo3uFt5/Ksiln+/XNjqFzv1JsCbC31q8aVs1 KCXU+2QuFB1emAhAYRATy+QtcuJmF9o60YN5WGbNnDmzzpwLMunRr7ae4ljzvEsstkAl fxl5xRBrrJ9/klt/3H+TSC87ESURXqEZTzxaePdokroJizPJ1+ptGyW0HiuvT9I2nPjT iucnKhSZVH0ZUlbieDk6DxM2OrJgNn+w5y5outwe43Mmr9k5yLgvmIcL02J6OVsO0nce fPsAfTD81X4ysw4wD3JzpmiGqkHTfHrY394CTCpRoYvF5hQdHWA7cP2ktmn3W7+NBFV6 w4hA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k14si471073pfj.262.2018.02.22.11.37.52; Thu, 22 Feb 2018 11:38:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751399AbeBVTgQ (ORCPT + 99 others); Thu, 22 Feb 2018 14:36:16 -0500 Received: from mga14.intel.com ([192.55.52.115]:31168 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750995AbeBVTgP (ORCPT ); Thu, 22 Feb 2018 14:36:15 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2018 11:36:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,378,1515484800"; d="scan'208";a="19693812" Received: from lkannan-mobl3.amr.corp.intel.com (HELO [10.254.100.148]) ([10.254.100.148]) by fmsmga008.fm.intel.com with ESMTP; 22 Feb 2018 11:36:14 -0800 Subject: Re: Use higher-order pages in vmalloc To: Andy Lutomirski References: <151670492223.658225.4605377710524021456.stgit@buzz> <151670493255.658225.2881484505285363395.stgit@buzz> <20180221154214.GA4167@bombadil.infradead.org> <20180221170129.GB27687@bombadil.infradead.org> <20180222065943.GA30681@dhcp22.suse.cz> <20180222122254.GA22703@bombadil.infradead.org> <20180222133643.GJ30681@dhcp22.suse.cz> Cc: Michal Hocko , Matthew Wilcox , Konstantin Khlebnikov , LKML , Christoph Hellwig , Linux-MM , Andrew Morton , "Kirill A. Shutemov" From: Dave Hansen Message-ID: Date: Thu, 22 Feb 2018 11:36:13 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/22/2018 11:27 AM, Andy Lutomirski wrote: > On Thu, Feb 22, 2018 at 7:19 PM, Dave Hansen wrote: >> On 02/22/2018 11:01 AM, Andy Lutomirski wrote: >>> On x86, if you shoot down the PTE for the current stack, you're dead. >> >> *If* we were to go do this insanity for vmalloc()'d memory, we could >> probably limit it to kswapd, and also make sure that kernel threads >> don't get vmalloc()'d stacks or that we mark them in a way to say we >> never muck with them. > > How does that help? We need to make sure that the task whose stack > we're migrating is (a) not running and (b) is not being switched in or > out. And we have to make sure that there isn't some *other* mm that > has the task's stack in ASID's TLB space. > > Maybe we take some lock so the task can't run, then flush the world, > then release the lock. Oh, I was thinking only of the case where you try to muck with your *own* stack. But, I see what you are saying about doing it to another task on another CPU that is actively using the stack. I think what you're saying is that we do not want to handle faults that are caused by %esp being unusable. Whatever we do, we've got to make sure that no CPU has a stack in %esp that we are messing with.