Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp991218ybt; Wed, 24 Jun 2020 16:51:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxeqGaH15wyOWH1Ajc9eqO1r3DATetfiKaKkWTFNkzA2Zx+i1KUzP+YOhanEjnLkj/0kND X-Received: by 2002:a17:906:4d52:: with SMTP id b18mr5172947ejv.256.1593042690415; Wed, 24 Jun 2020 16:51:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593042690; cv=none; d=google.com; s=arc-20160816; b=Pm5iEAEDebVrppQOrRvNuHCSHKF0RwjqWdwCKbOh3l/g58OFlqDONjWlkYpaG24CE3 mM8e5urSmob0HzTpzE7kwA9ZoH2FAlrkDJKOfy7SeZZAv1VK5vJWrefW/TuXLfUYXKAY hOLkHA8UzHr6oUr8ER2Ar7rz5NT36sURLjhgdskLhqRm+9I0XqYY2j2WAHhpvpf/cqf0 LoKBxzmtjee+hkce3GzGNxHRXiSik3ctXlrJTBJsXPd6LBMReKusJpyncpHvTW9g9skh vOKcYZysFpCI0pMCj/RXx7THdSKLgJoErQwbF92OdFJreap4Kfm4UvxAPMxBe6Z5Gygd FRag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4Fvdsiz8MkdsVL2lFPEcvvla/ra3rq7tEtUzSg1iTxM=; b=sCs/bOYxT6WkzZUuM+WddqcOmF1AQNSqzVFWlMjXFo0VZ+ctYae2lE0dBjtK90tdkb yYXBeFfeuza3FsedkLHHWExt2SfCd0KDbnyY0b5v9Y3I3fsXrsGfw34TaNZbqawKkjiT arBrWIj80Mody0c1LGY9W9N96m2gjlGVIYpBdFzIM6gVGETUclV8VCmMmBO89IhQ4N9B aUdWd2H4uVr9UxqMS4KTpR7ozZJ8n680oJnbUgCMP9dbA61BoFOstrpq/61LJcX8hm3G MQmR0ljR0BdowCxtsNbITzMY5YLddXr85HvjDf85yG3Wjxb4p6bfH/mzZd2bNoUCgLy8 txfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=IOqtxZqb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d10si15596777edm.521.2020.06.24.16.50.52; Wed, 24 Jun 2020 16:51:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=IOqtxZqb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387981AbgFXXra (ORCPT + 99 others); Wed, 24 Jun 2020 19:47:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387881AbgFXXra (ORCPT ); Wed, 24 Jun 2020 19:47:30 -0400 Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B00C3C061573 for ; Wed, 24 Jun 2020 16:47:29 -0700 (PDT) Received: by mail-ed1-x541.google.com with SMTP id t21so2756689edr.12 for ; Wed, 24 Jun 2020 16:47:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4Fvdsiz8MkdsVL2lFPEcvvla/ra3rq7tEtUzSg1iTxM=; b=IOqtxZqbihUe4NvFtQ7g5qCSWj8O1LYkVEuxXmcx7dHb4dYyDa8iAUfuh0i7p2GGkV ujBwdaGwcX63sAQjzq+Si9yp9Db3wkCa/Lb7FZuHkD0kofSwJKZF8YFC7F73T6nwmANU N7YkcpDdMnA2oBJbSlfeTqbxeS9/iXdZyMFJP/f1rfGicLsgwtAq763avr7uQnJFmVWW 9uF/KIOnWchdRqfQzo8geoUqkLEanZer5/kccG4QPofmpB2bLHD9RIUAVOaaaM47ntSH WLK3eKki5Q5S7J/fmjlWULSqZ1ZeO7EdROH8VvshTht+VAy2gLNGZu8kjxw1xhh2zStY hR8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4Fvdsiz8MkdsVL2lFPEcvvla/ra3rq7tEtUzSg1iTxM=; b=RvGQtQn1g84uEFtYe1byiNlZylRKjSYtA99Ywn83Iekykk5AwOPTcYV69V3mv85dN0 5+hjFqnth7Wrivsqt3bIT7ZWlzqEfPjl5HfBbmkVZzPHWBJt1ukQA5VDTEBulImlzI/v 4rcvoJodxWvDYM9jMiHn4We1nDgf9PxGZVUXP59bDsDihhtzU8WlE8C6oaBCYMTrn5mX SkLzhKmEjPblOeryHTLzuRZ6uLbz0I9sSpL7x6v72c6/8SBwUYf7twgIlTq2eW0X4KQY leUTFnP1PujYrLViMb95pVa14xfFYWt83Q7S5YEdFcVaxkhgSN/A14pJ+WacCEXnZmtc yTAA== X-Gm-Message-State: AOAM533hcylfRhO3mSZEW65IGqyBVH/6c0ei15NTLVQZTKvs0g27xUfv y8Pfde3wlfL1yoT6RsCvzO43RU+rohlS0Bw+wvM8Jg== X-Received: by 2002:a50:d9cb:: with SMTP id x11mr14314671edj.93.1593042448202; Wed, 24 Jun 2020 16:47:28 -0700 (PDT) MIME-Version: 1.0 References: <20200623094258.6705-1-richard.weiyang@linux.alibaba.com> <20200623151828.GA31426@dhcp22.suse.cz> <20200624061340.GA11552@L-31X9LVDL-1304.local> <20200624220552.GA15016@L-31X9LVDL-1304.local> <20200624224410.GD15016@L-31X9LVDL-1304.local> In-Reply-To: <20200624224410.GD15016@L-31X9LVDL-1304.local> From: Dan Williams Date: Wed, 24 Jun 2020 16:47:17 -0700 Message-ID: Subject: Re: [PATCH] mm/spase: never partially remove memmap for early section To: Wei Yang Cc: Michal Hocko , Andrew Morton , Oscar Salvador , Linux MM , Baoquan He , Linux Kernel Mailing List , David Hildenbrand Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 24, 2020 at 3:44 PM Wei Yang wrote: [..] > >So, you are right that there is a mismatch here, but I think the > >comprehensive fix is to allow early sections to be partially > >depopulated/repopulated rather than have section_activate() and > >section_deacticate() special case early sections. The special casing > >is problematic in retrospect as section_deactivate() can't be > >maintained without understand special rules in section_activate(). > > Hmm... This means we need to adjust pfn_valid() too, which always return true > for early sections. Right, rather than carry workarounds in 3 locations, and the bug that has resulted from then getting out of sync, just teach early section mapping to allow for the subsection populate/depopulate.