Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5253075imm; Tue, 31 Jul 2018 07:58:27 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfqJ57tPqRAI3LU97Y5mfYFNNUN+i1TBMTuKS/4cSUjMUSOKvSDwUU/fZ+LGLBIIqbTcIzs X-Received: by 2002:a17:902:6193:: with SMTP id u19-v6mr20648450plj.133.1533049107841; Tue, 31 Jul 2018 07:58:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533049107; cv=none; d=google.com; s=arc-20160816; b=i2PTXAOOkZhlzjalC4D8cTfQk1nvxt5Uhmqph5UKsELlwnk3SMj8TJKwKzXz9BAKfm Q0agVTdUpNHsMMvAAlq4K+n/Pi67s3L/QaAI64opYXIiFtGhXr7K47HVbFYxMCifpplV 7/coZhDciXMFp728UyspJw/4iyzNZaB+PvSplctUgZxj6Z14osr2CHmj33dqj4bVDZ/1 oVYXEoYwfH2fv5IY1ZNUxU6k9TRGotLoKSWVWMd8AkPj5BulBDWzhwaXX7PGdcXlgBlg AfBMA8GZFupBqGycdXonPgRpgtgN3CXpmc5xMnBNN4JrWrKKzc8fUWPrICbgbnWn4S7m 8Thg== 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:dkim-signature:arc-authentication-results; bh=RGgn3PFXwcU9A9OnXHcqNNvMrbrHZqJ5jkILJrTmkpk=; b=r8y9KPVGOIp7c/UEBGqruS+is5r5ROC0CNvPb7Zbh1niDsdUN/G1p618aSz9Hx9z4H L8SHbuYVGSCy0Zuz+pud2O2r2mSuob6uEYJDnMhImWjWuxmMHWneGKyuRjd0LTWgVg20 4PFBK2m18t8VngI+eRvMr2ayPeSIJdwk0G+HjDdc3ZhhmvW69uhnIw00KYBZ61/qwLRP 2d9tiuY35psPmPucxOQ6OcuksPBHyRqfK+PPVYyz5oCPwEwOyUn9yYowgC6FHctfz4HX 0sZABqrqGM6p8SHn7vL1ZEsZutQ3rozUFnt567YYAKstv+lzqyAk0LveQWXaNwQhx0wn I0jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=wc+YSr1n; 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 w14-v6si14439963pgh.14.2018.07.31.07.58.13; Tue, 31 Jul 2018 07:58: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; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=wc+YSr1n; 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 S1732394AbeGaQiI (ORCPT + 99 others); Tue, 31 Jul 2018 12:38:08 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38158 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732268AbeGaQiI (ORCPT ); Tue, 31 Jul 2018 12:38:08 -0400 Received: by mail-pg1-f194.google.com with SMTP id k3-v6so9220694pgq.5 for ; Tue, 31 Jul 2018 07:57:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=RGgn3PFXwcU9A9OnXHcqNNvMrbrHZqJ5jkILJrTmkpk=; b=wc+YSr1nLaUItVpldyFLJUwqKr01J1c45AI30PtCYloUkQz2WHchDDwYW5F54thWle D57d6vkwYBWrtILTBcZAsYh0MIANhZtAjREImV5z5rzEYzMEez6fW3vp1e7YZRgAjKIA ajvIwbr2JLEdB6XKAK8hhlRqANY0ARCcYEWefLO7UPwoiq21ChpGbg+4n0xynvTw6frp J3TkqRn7roLSasjzJNsDqBhnDYrbCc49UQ1z7N+C0vWrlYLFTLXf1KAs2U2WPce+Kg1R L84wCc+/xebON7ZPbRgdIxwhtnRWXMQpSZLm3nB0x4BlYfFcPEIMFSt8mWAGnuz697ca 4NPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RGgn3PFXwcU9A9OnXHcqNNvMrbrHZqJ5jkILJrTmkpk=; b=bCJ2QTD5T94Etk4DtvkfjN8YCALbeGLhFpOPdCyuOVyGrAlhA4tCo7TUNmF13vc2eo VnXpksYTCTFRgPplv+1YP83Bm+PqvvNqkLe+1Rwd+dv5q7HA28y3KEOQb8qa6OYkUNUs uBzJGMpwFI8Hja41E6pT6lLO+9B0QkmuNzqKP8OniNcI5e29YwSOGwoe1/WlKrBda2ME e2wgjofoXMNvoZ3sS4AJGwRiXLCBUq4Eym9r69HoPY2zTcujKuom0dEYmsHt7tZu5MsO fX9s6Ug2dKisThNaJxM+WoDqpnfKGsdbFQH/a+WeAUQrt7/PxrSDpsyiC3lDrHot8PhR P3KA== X-Gm-Message-State: AOUpUlFHFNTAAQNewsQccKUi+o2lpBegE6uLK9AcVTOeHlhEmO/PqEA2 rAqBUlFxHWwfFmQdiksayRnLXQ== X-Received: by 2002:a63:e516:: with SMTP id r22-v6mr20405502pgh.170.1533049045427; Tue, 31 Jul 2018 07:57:25 -0700 (PDT) Received: from kshutemo-mobl1.localdomain ([134.134.139.83]) by smtp.gmail.com with ESMTPSA id y3-v6sm42973955pfi.24.2018.07.31.07.57.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Jul 2018 07:57:24 -0700 (PDT) Received: by kshutemo-mobl1.localdomain (Postfix, from userid 1000) id 4E9143002A5; Tue, 31 Jul 2018 17:57:19 +0300 (+03) Date: Tue, 31 Jul 2018 17:57:19 +0300 From: "Kirill A. Shutemov" To: Linus Torvalds Cc: Hugh Dickins , Matthew Wilcox , Amit Pundir , "Kirill A. Shutemov" , Andrew Morton , Dmitry Vyukov , Oleg Nesterov , Andrea Arcangeli , Greg Kroah-Hartman , John Stultz , linux-mm , Linux Kernel Mailing List , youling257@gmail.com Subject: Re: Linux 4.18-rc7 Message-ID: <20180731145718.pbyy3qkp2a2yvucs@kshutemo-mobl1> References: <20180730130134.yvn5tcmoavuxtwt5@kshutemo-mobl1> <20180731062927.hjknfcb2cj3bwd7b@kshutemo-mobl1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180731062927.hjknfcb2cj3bwd7b@kshutemo-mobl1> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 31, 2018 at 09:29:27AM +0300, Kirill A. Shutemov wrote: > On Mon, Jul 30, 2018 at 06:01:26PM -0700, Linus Torvalds wrote: > > On Mon, Jul 30, 2018 at 2:53 PM Hugh Dickins wrote: > > > > > > I have no problem with reverting -rc7's vma_is_anonymous() series. > > > > I don't think we need to revert the whole series: I think the rest are > > all fairly obvious cleanups, and shouldn't really have any semantic > > changes. > > > > It's literally only that last patch in the series that then changes > > that meaning of "vm_ops". And I don't really _mind_ that last step > > either, but since we don't know exactly what it was that it broke, and > > we're past rc7, I don't think we really have any option but the revert > > it. > > > > And if we revert it, I think we need to just remove the > > VM_BUG_ON_VMA() that it was supposed to fix. Because I do think that > > it is quite likely that the real bug is that overzealous BUG_ON(), > > since I can't see any reason why anonymous mappings should be special > > there. > > > > But I'm certainly also ok with re-visiting that commit later. I just > > think that right _now_ the above is my preferred plan. > > > > Kirill? > > Considering the timing, I'm okay with reverting the last patch with > dropping the VM_BUG_ON_VMA(). > > But in the end I would like to see strong vma_is_anonymous(). > > The VM_BUG_ON_VMA() is only triggerable by the test case because > vma_is_anonymous() false-positive in fault path and we get anon-THP > allocated in file-private mapping. > > I don't see immediately how this may trigger other crashes. > But it definitely looks wrong. > > > > I'm all for deleting that VM_BUG_ON_VMA() in zap_pmd_range(), it was > > > just a compromise with those who wanted to keep something there; > > > I don't think we even need a WARN_ON_ONCE() now. > > > > So to me it looks like a historical check that simply doesn't > > "normally" trigger, but there's no reason I can see why we should care > > about the case it tests against. > > I'll think more on what could go wrong with __split_huge_pmd() called on > anon-THP page without mmap_sem(). It's not yet clear cut to me. I think not having mmap_sem taken at least on read when we call __split_huge_pmd() opens possiblity of race with khugepaged: khugepaged can collapse the page back to THP as soon as we drop ptl. As result pmd_none_or_trans_huge_or_clear_bad() would return true and we basically leave the THP behind, not zapped. -- Kirill A. Shutemov