From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0212C43331 for ; Thu, 2 Apr 2020 08:58:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5F4E72080C for ; Thu, 2 Apr 2020 08:58:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5F4E72080C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B56818E0008; Thu, 2 Apr 2020 04:58:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B06748E0007; Thu, 2 Apr 2020 04:58:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9CED48E0008; Thu, 2 Apr 2020 04:58:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0078.hostedemail.com [216.40.44.78]) by kanga.kvack.org (Postfix) with ESMTP id 8311D8E0007 for ; Thu, 2 Apr 2020 04:58:17 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 4E37C8789 for ; Thu, 2 Apr 2020 08:58:17 +0000 (UTC) X-FDA: 76662313434.01.pot20_82891813c942b X-HE-Tag: pot20_82891813c942b X-Filterd-Recvd-Size: 4691 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Thu, 2 Apr 2020 08:58:16 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id 91so1257077wri.10 for ; Thu, 02 Apr 2020 01:58:16 -0700 (PDT) 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; bh=K2JhR4SxbadwlqUN/IjOvykPTmqpzOo0pony5csNGqQ=; b=hErh+P8cskxw5EuYxjj18B4VHfv2KQe6mjMPzAjnReW4Zeyx6fw78wmFY9U2FZk3xh RC7nlvP9bnmAeMwC5NZh9ZNNwto/0VZTPZ+KKT2TF+PMPr1MKDN4eYsvhX1RMJ0rSS81 kXxhj8VHS1z3Sv5W9hWGrmhb+N6aPOppQ/KWwP5vSLdOJLobrY7HUtGZNRcOIPnk8wkZ 0/QlJ1NGJxbrkyZBjReRvdVD0v6/jCHHvBB8zE6HsTPLMc1kl3//eC3p4jzHJj8s/oJ8 fYNc+KAY4U4Y2WPTpkQMTNP7tMmBNb6nnxN5l47wrYAB5rpLlnXJQZWniZcE+tHftmBe s4VA== X-Gm-Message-State: AGi0Pua9PIf1kHsApVNLjUJjQcGfo8UPZZwW+1z8tyqMyycDjf5JIj5A QZJ17rUAR4QJYkLnz7+Tyic= X-Google-Smtp-Source: APiQypKEO4qfbIDFx5anp0NEC4g9dSqvOO5psAXmB7l8aQ+1idmWuz8szhHxCraEOrWRGY21teZzuA== X-Received: by 2002:a5d:630b:: with SMTP id i11mr2295801wru.94.1585817895786; Thu, 02 Apr 2020 01:58:15 -0700 (PDT) Received: from localhost (ip-37-188-180-223.eurotel.cz. [37.188.180.223]) by smtp.gmail.com with ESMTPSA id j135sm6487770wmj.46.2020.04.02.01.58.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 01:58:14 -0700 (PDT) Date: Thu, 2 Apr 2020 10:58:13 +0200 From: Michal Hocko To: Konstantin Khlebnikov Cc: "Huang, Ying" , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Zi Yan , Andrea Arcangeli , "Kirill A . Shutemov" , Vlastimil Babka , Alexey Dobriyan , =?utf-8?B?Su+/vXLvv71tZQ==?= Glisse , Yang Shi Subject: Re: [PATCH -V2] /proc/PID/smaps: Add PMD migration entry parsing Message-ID: <20200402085813.GN22681@dhcp22.suse.cz> References: <20200402020031.1611223-1-ying.huang@intel.com> <20200402064437.GC22681@dhcp22.suse.cz> <87zhbufjyc.fsf@yhuang-dev.intel.com> <20200402074411.GH22681@dhcp22.suse.cz> <87v9mifgui.fsf@yhuang-dev.intel.com> <20200402082142.GL22681@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu 02-04-20 11:29:09, Konstantin Khlebnikov wrote: > > > On 02/04/2020 11.21, Michal Hocko wrote: > > On Thu 02-04-20 16:10:29, Huang, Ying wrote: > > > Michal Hocko writes: > > > > > > > On Thu 02-04-20 15:03:23, Huang, Ying wrote: > > [...] > > > > > > Could you explain why do we need this WARN_ON? I haven't really checked > > > > > > the swap support for THP but cannot we have normal swap pmd entries? > > > > > > > > > > I have some patches to add the swap pmd entry support, but they haven't > > > > > been merged yet. > > > > > > > > > > Similar checks are for all THP migration code paths, so I follow the > > > > > same style. > > > > > > > > I haven't checked other migration code paths but what is the reason to > > > > add the warning here? Even if this shouldn't happen, smaps is perfectly > > > > fine to ignore that situation, no? > > > > > > Yes. smaps itself is perfectly fine to ignore it. I think this is used > > > to find bugs in other code paths such as THP migration related. > > > > Please do not add new warnings without a good an strong reasons. As a > > matter of fact there are people running with panic_on_warn and each > > warning is fatal for them. Please also note that this is a user trigable > > path and that requires even more care. > > > > But this should not happen and if it does we'll never know without debug. The migration path which already deals with this will notice, right? Those are paths which really care about consistency. > VM_WARN_ON checks something only if build with CONFIG_DEBUG_VM=y. > > Anybody who runs debug kernels with panic_on_warn shouldn't expect much stability =) That doesn't mean we should be adding warnings here and there nilly willy. -- Michal Hocko SUSE Labs