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 B919AC43331 for ; Thu, 2 Apr 2020 08:21:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 821D42078E for ; Thu, 2 Apr 2020 08:21:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 821D42078E 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 DBB488E0008; Thu, 2 Apr 2020 04:21:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D44EA8E0007; Thu, 2 Apr 2020 04:21:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C0BE28E0008; Thu, 2 Apr 2020 04:21:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0145.hostedemail.com [216.40.44.145]) by kanga.kvack.org (Postfix) with ESMTP id A6A508E0007 for ; Thu, 2 Apr 2020 04:21:45 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 6F0188133 for ; Thu, 2 Apr 2020 08:21:45 +0000 (UTC) X-FDA: 76662221370.28.trees28_669d99fc63f5c X-HE-Tag: trees28_669d99fc63f5c X-Filterd-Recvd-Size: 3901 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Thu, 2 Apr 2020 08:21:45 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id z14so6300107wmf.0 for ; Thu, 02 Apr 2020 01:21:44 -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=3yw/mZugffXhJm2+MbO9KEG1ll5RyPq6d+/bgOj0P7Y=; b=S/0J7i9aKEW3fSn5p4qihmebOgLb9CvIzo8ciES8lVlZWXhSu40P14YB6rO3Lcgfer Ld5UN1XqPeZg/L+O2FT7KKtYr06x/03vUB3+7otwYpwxXhct4RfFLYwvGvGimDf/LXih ctgJlHJWwSAY6N7efhLAWDcmqt6hUXp4lkAb30HLbGO7GPPn3Qs7xnrdhmCloFXVx0sO q1vmZ6S0WIh+8ea//hc4QN2pyExGL9StQOBgcHMIYOBsT2spkY2yH8J63ZVunVSNP+GW Rl/OPC9PKPbjZWXtXPyYOJqSanX3ju1rnrOkxX9F7/k1FXiSxEaLB0ts3Y1N95v9Lb+Z MFCw== X-Gm-Message-State: AGi0PuYXnydc/G/ZCQOqUULejQW9jikinIjnmwGaget9zlMtdQHmd2nH 8cDE0tfVP7Ku0BLnRowRTso= X-Google-Smtp-Source: APiQypIRgfJOEvtCzoD8kQfJBLr/c8mDN70xY0FqOj5l0qXDaIAfoDdbVoz3p1CjTuk7lH3y8Jq/2A== X-Received: by 2002:a05:600c:291a:: with SMTP id i26mr2213291wmd.96.1585815704010; Thu, 02 Apr 2020 01:21:44 -0700 (PDT) Received: from localhost (ip-37-188-180-223.eurotel.cz. [37.188.180.223]) by smtp.gmail.com with ESMTPSA id j11sm6086257wmi.33.2020.04.02.01.21.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 01:21:43 -0700 (PDT) Date: Thu, 2 Apr 2020 10:21:42 +0200 From: Michal Hocko To: "Huang, Ying" Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Zi Yan , Andrea Arcangeli , "Kirill A . Shutemov" , Vlastimil Babka , Alexey Dobriyan , Konstantin Khlebnikov , =?utf-8?B?Suly9G1l?= Glisse , Yang Shi Subject: Re: [PATCH -V2] /proc/PID/smaps: Add PMD migration entry parsing Message-ID: <20200402082142.GL22681@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87v9mifgui.fsf@yhuang-dev.intel.com> 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 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. -- Michal Hocko SUSE Labs