Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp558837imm; Tue, 15 May 2018 05:56:27 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrclkTccAVDgZVRBsOqHMIRmgqw9mZUktV/gof01ZpJLsrgWZs5WOhcEUID50OZTDIhmplf X-Received: by 2002:a17:902:70c9:: with SMTP id l9-v6mr14266911plt.382.1526388987476; Tue, 15 May 2018 05:56:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526388987; cv=none; d=google.com; s=arc-20160816; b=hhxy8/BRGy+CBX47NXONPet7ByOAjpgmthaq59SYbdYQ7Lgfwn/CYc7iDti6JiLbb5 Wy89I38gQ/vizGirgyIFAhGCEw1tvXn4I5R3yS4ERGqCLlTS1uh3mVa3RYFAHoLhrqlo oDn7iZI9fQE6psukLdzeOAC8S+76Ul3iAgdHQgc4zF5b5BWTNUBMm8PSKEuSHoUhsqXj IgVIP3l+wLHURdw+BjD9dRHw78g4CK7b68JrRF3rsZYKm7ZYSD06/FvvFt585i9uRiP8 zYZBGILL0g1Mca5WHIyNqpsPg8xFUQ+DK+xrUYjCVYXBKr+znYrzqsrhzY7yE/BY1hbm GPKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=puCzcyd1I1R8BSM8QrL2q9jk0sXhwesjbmjnFIxwBlo=; b=mnQj1Iow2HNXudyVd945rskQB1Ucj4vChaX2Y5FS7CwNriE5e156F5jhSpn302FESD NSAPOvenD6YSHbjBSIjKqqcdaIbDf4q9D1bNMgTJKhVQDAL51scK9NcWV1pujR5EsoD6 M1rW8CXqbUj9wcN0CIhn4YHNn6NHF5NmPHtFe6ML7Ew7XZJ4HznJa3ehnM+oftv0R0UC djVTbo70gpWBhBRVsV1SVB1sExq3WFL9u1fcstJxSwBSfCdbRqajNifMh+RILuIXrwKQ lf9RRhZAxUNq/huEc3+kxKvERXSAFuoMOFBwDs5n3hnLaa8XdQtR/YSoUSQKeM7kLEn9 HB4g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m15-v6si9388810pgu.352.2018.05.15.05.56.12; Tue, 15 May 2018 05:56:27 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752943AbeEOMzq (ORCPT + 99 others); Tue, 15 May 2018 08:55:46 -0400 Received: from mx2.suse.de ([195.135.220.15]:45293 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752280AbeEOMzp (ORCPT ); Tue, 15 May 2018 08:55:45 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BB97EAEC6; Tue, 15 May 2018 12:55:43 +0000 (UTC) Date: Tue, 15 May 2018 14:55:41 +0200 From: Michal Hocko To: Pavel Tatashin Cc: Steven Sistare , Daniel Jordan , Andrew Morton , LKML , tglx@linutronix.de, Linux Memory Management List , mgorman@techsingularity.net, mingo@kernel.org, peterz@infradead.org, Steven Rostedt , Fengguang Wu , Dennis Zhou Subject: Re: [PATCH v2] mm: allow deferred page init for vmemmap only Message-ID: <20180515125541.GH12670@dhcp22.suse.cz> References: <20180510115356.31164-1-pasha.tatashin@oracle.com> <20180510123039.GF5325@dhcp22.suse.cz> <20180515091036.GC12670@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 15-05-18 08:17:27, Pavel Tatashin wrote: > Hi Michal, > > Thank you for your reply, my comments below: > > > You are now disabling a potentially useful feature to SPARSEMEM users > > without having any evidence that they do suffer from the issue which is > > kinda sad. Especially when the only known offender is a UP pcp allocator > > implementation. > > True, but what is the use case for having SPARSEMEM without virtual mapping > and deferred struct page init together. Is it a common case to have > multiple gigabyte of memory and currently NUMA config to benefit from > deferred page init and yet not having a memory for virtual mapping of > struct pages? Or am I missing some common case here? Well, I strongly suspect that this is more a momentum, then a real reason to stick with SPARSEMEM_MANUAL. I would really love to reduce the number of memory models we have. Getting rid of SPARSEMEM would be a good start as VMEMMAP should be much better. > > I will not insist of course but it seems like your fix doesn't really > > prevent virt_to_page or other direct page access either. > > I am not sure what do you mean, I do not prevent virt_to_page, but that is > OK for SPARSEMEM_VMEMMAP case, because we do not need to access "struct > page" for this operation, as translation is in page table. Yes, we do not > prohibit other struct page accesses before mm_init(), but we now have a > feature that checks for uninitialized struct page access, and if those will > happen, we will learn about them. This will always be a maze as the early boot tends to be. Sad but true. That is why I am not really convinced we should use a large hammer and disallow deferred page initialization just because UP implementation of pcp does something too early. We should instead rule that one odd case. Your patch simply doesn't rule a large class of potential issues. It just rules out a potentially useful feature for an odd case. See my point? -- Michal Hocko SUSE Labs