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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CA84C433F5 for ; Wed, 6 Oct 2021 23:41:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 535D961038 for ; Wed, 6 Oct 2021 23:41:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 535D961038 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id C6BAD900002; Wed, 6 Oct 2021 19:41:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C1CC36B0071; Wed, 6 Oct 2021 19:41:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B3174900002; Wed, 6 Oct 2021 19:41:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0246.hostedemail.com [216.40.44.246]) by kanga.kvack.org (Postfix) with ESMTP id A3D146B006C for ; Wed, 6 Oct 2021 19:41:49 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4E89A18022D1E for ; Wed, 6 Oct 2021 23:41:49 +0000 (UTC) X-FDA: 78667637538.22.CF1BDF5 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by imf18.hostedemail.com (Postfix) with ESMTP id E9FEF4002A56 for ; Wed, 6 Oct 2021 23:41:48 +0000 (UTC) Received: by mail-ed1-f54.google.com with SMTP id p13so16380490edw.0 for ; Wed, 06 Oct 2021 16:41:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NQwcNOx9GglWf+fmi9j9KTVEDziCVIDG+WjU0d3iHyc=; b=REIXGnTFX76AuXrOg1PBHPCrJgubDpKyWzesIIgbYb/3Y1lblxvvIMKDk38IqYCXaI gahT1OtBYzsAJl6la7acrGzJsLfC41qOT+GqL0q/k4j+Vf3n+jHO2Fd2z+WLOzPSEnII swrYnpKvLmqTlMIifw33maWy3B3BBg/Ri1xFohbzoKJYRxgH1Cm6vrhgvAjBHWh/sN0c qDzoBFqcaIS7JR7sFtc0AtYz2nSS5OAo7ItCQuMl1i4RrkfKVJY/CRMx09O2AspJT7B2 579XJAPBhJBzRxDPejPk84TijqGqxpflHLcj0xRppl9zqcsckxSSjvXDT2GZjVtAnVCd 3ujg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NQwcNOx9GglWf+fmi9j9KTVEDziCVIDG+WjU0d3iHyc=; b=1HWQMymnu1KcwlZ259yCbezQuLsZz8WzIXGZZBc8n05bkj0bH58VPWqimpTsCMbae1 a6Xd2pGESa/qL6S1VUTZ4eo+fhA80F9AMOwV4bgIznKprZTBUzzPpw1hYtK9Xe+x9aqG duDLe1RzN/IxYyICVWl/HpqB1KWJIzVYD6wCyRZxN8Gkqd5CGXzNglA6pzaWq7ineE9G Nzte+si7+GqP2JCIrWfJ3DPQShFAr71ySIzcJqVbvXxxecFsWduYoI2NU0DbGa40+jbF ELJUCdzBLrPmgoLpucivUuuxm3WREFifHS5+W5Ok4g6ARa20aLGyREdeBU+Th+SgMt95 mgDg== X-Gm-Message-State: AOAM533fTPN5EF7rgWwMWFrW5MgvdjRN4e7gisDKuxsW5vXKP0JokC7T OrMgriJyUvM1mBRwzaPvXF4vY5+RjTCFbZgHOYE= X-Google-Smtp-Source: ABdhPJy9+bUhXx3lkHWAACY8TPub7AApKhM1sGHByTwPknAcpEoB7cL0RuGAEs1bFyCX0GV1DS2BnTE9h+MfVy7XGe8= X-Received: by 2002:a17:907:6297:: with SMTP id nd23mr1562092ejc.62.1633563707661; Wed, 06 Oct 2021 16:41:47 -0700 (PDT) MIME-Version: 1.0 References: <20210930215311.240774-1-shy828301@gmail.com> <20210930215311.240774-3-shy828301@gmail.com> <20211004140637.qejvenbkmrulqdno@box.shutemov.name> <20211004194130.6hdzanjl2e2np4we@box.shutemov.name> In-Reply-To: From: Yang Shi Date: Wed, 6 Oct 2021 16:41:35 -0700 Message-ID: Subject: Re: [v3 PATCH 2/5] mm: filemap: check if THP has hwpoisoned subpage for PMD page fault To: Peter Xu Cc: "Kirill A. Shutemov" , =?UTF-8?B?SE9SSUdVQ0hJIE5BT1lBKOWggOWPoyDnm7TkuZ8p?= , Hugh Dickins , "Kirill A. Shutemov" , Matthew Wilcox , Oscar Salvador , Andrew Morton , Linux MM , Linux FS-devel Mailing List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=REIXGnTF; spf=pass (imf18.hostedemail.com: domain of shy828301@gmail.com designates 209.85.208.54 as permitted sender) smtp.mailfrom=shy828301@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: E9FEF4002A56 X-Stat-Signature: 5g3s4mrtk83caosh5nr9nqfkqqhqnkfp X-HE-Tag: 1633563708-278118 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 Wed, Oct 6, 2021 at 12:54 PM Peter Xu wrote: > > On Mon, Oct 04, 2021 at 01:13:07PM -0700, Yang Shi wrote: > > On Mon, Oct 4, 2021 at 12:41 PM Kirill A. Shutemov wrote: > > > > > > On Mon, Oct 04, 2021 at 11:17:29AM -0700, Yang Shi wrote: > > > > On Mon, Oct 4, 2021 at 7:06 AM Kirill A. Shutemov wrote: > > > > > > > > > > On Thu, Sep 30, 2021 at 02:53:08PM -0700, Yang Shi wrote: > > > > > > diff --git a/mm/filemap.c b/mm/filemap.c > > > > > > index dae481293b5d..2acc2b977f66 100644 > > > > > > --- a/mm/filemap.c > > > > > > +++ b/mm/filemap.c > > > > > > @@ -3195,12 +3195,12 @@ static bool filemap_map_pmd(struct vm_fault *vmf, struct page *page) > > > > > > } > > > > > > > > > > > > if (pmd_none(*vmf->pmd) && PageTransHuge(page)) { > > > > > > - vm_fault_t ret = do_set_pmd(vmf, page); > > > > > > - if (!ret) { > > > > > > - /* The page is mapped successfully, reference consumed. */ > > > > > > - unlock_page(page); > > > > > > - return true; > > > > > > - } > > > > > > + vm_fault_t ret = do_set_pmd(vmf, page); > > > > > > + if (!ret) { > > > > > > + /* The page is mapped successfully, reference consumed. */ > > > > > > + unlock_page(page); > > > > > > + return true; > > > > > > + } > > > > > > } > > > > > > > > > > > > if (pmd_none(*vmf->pmd)) { > > > > > > > > > > Hm. Is it unrelated whitespace fix? > > > > > > > > It is a coding style clean up. I thought it may be overkilling to have > > > > a separate patch. Do you prefer separate one? > > > > > > Maybe. I tried to find what changed here. It's confusing. > > > > Yeah, maybe. Anyway I will separate the real big fix and the cleanup > > into two patches. This may be helpful for backporting too. > > Or maybe we just don't touch it until there's need for a functional change? I > feel it a pity to lose the git blame info for reindent-only patches, but no > strong opinion, because I know many people don't think the same and I'm fine > with either ways. TBH I really don't think keeping old "git blame" info should be an excuse to avoid any coding style cleanup. > > Another side note: perhaps a comment above pageflags enum on PG_has_hwpoisoned > would be nice? I saw that we've got a bunch of those already. I was thinking about that, but it seems PG_double_map doesn't have comment there either so I didn't add. > > Thanks, > > -- > Peter Xu >