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 99DA2C433EF for ; Fri, 8 Oct 2021 09:35:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1811360F90 for ; Fri, 8 Oct 2021 09:35:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1811360F90 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 977396B0071; Fri, 8 Oct 2021 05:35:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 927466B0072; Fri, 8 Oct 2021 05:35:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7EEE26B0073; Fri, 8 Oct 2021 05:35:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0026.hostedemail.com [216.40.44.26]) by kanga.kvack.org (Postfix) with ESMTP id 6D5886B0071 for ; Fri, 8 Oct 2021 05:35:33 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 2DDD38249980 for ; Fri, 8 Oct 2021 09:35:33 +0000 (UTC) X-FDA: 78672762546.17.29AB000 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) by imf12.hostedemail.com (Postfix) with ESMTP id C2D7E1000AB6 for ; Fri, 8 Oct 2021 09:35:32 +0000 (UTC) Received: by mail-lf1-f52.google.com with SMTP id m3so36941109lfu.2 for ; Fri, 08 Oct 2021 02:35:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=CAh8hwek0Nfg/c4XJ7agugoBthkVWd2136o2c/3om9k=; b=XG4XQgVjSvBsGjnPeBnoIafycROzklPNLhZyuYEQ8wcIqoaCgaGUi2IgVwwrrOaTWn Vt7a3T3QMV6JtwTb0FXwJZTnlIX0w3BUfVK7/K/HZR1cFpin8z/sXIzAVIw5ucRhiiOS xrNB0A8EPyYDuXyu82mkQ8954QbXXS4cjGApCE11Gk2InR0QAPbRe618E9kvQtRZMRJg hcQXzEF1i6qHo3urVnF5kgKSItR0CMXvdgHComAS3TIjkdsn5npdKqfnrvGcaGrk0V5W C38cKrrkGqpmJOubZuXfSr/jUrWZVtaX7ZdnPtha9mUSlhLmQvwGoWBtfRLsvkWZxZUa CWMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=CAh8hwek0Nfg/c4XJ7agugoBthkVWd2136o2c/3om9k=; b=5FScqTxQppug/5NGwMNo69VcDRrItB77A6b7mqYss2Lq526z5+IXIdpw0h0wKOquO5 0xAwltCS58ImredQXpAbiSvIJg0gd/IHhM9nWUYxjoYqefBMl3qne5VlAaXKqzw8G2XI ZKz8VmhFGToBJNmEhUhiX2rWXUYbxXlKHBHrIgtshr1S+U925dEp+t9+tsoq0A8Tmsq+ oojEdGwtLJ52a0w8gzpNhrugt31Tbky0a0IwquW6WJcvxc918nJpDtwoGDA4LPFG3pVC V5dA9Jpr+mLQeB8Rx97KCuOZxf09fYZyY3NirH61jwsmOjpbYitT5yeZzszIv/dIZlHl hOrw== X-Gm-Message-State: AOAM532O0Zw+yWYtuRa6imaypvnGBg98J7sAzC7NLlcFpidrDBt+o2yP MAz7OF4wthb+2FwsdRsdubMyLw== X-Google-Smtp-Source: ABdhPJwLGW8HXwRiYAQ+xuUjNu/jgdX5nEDrRJfqm2RowJ0ATycMGwZzWVZQomTc/2Iw6KRYCEZhNg== X-Received: by 2002:a05:6512:31c1:: with SMTP id j1mr9838363lfe.442.1633685731071; Fri, 08 Oct 2021 02:35:31 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id s18sm195895lfs.294.2021.10.08.02.35.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 02:35:30 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id A0B051030F5; Fri, 8 Oct 2021 12:35:29 +0300 (+03) Date: Fri, 8 Oct 2021 12:35:29 +0300 From: "Kirill A. Shutemov" To: Peter Xu Cc: Yang Shi , HORIGUCHI =?utf-8?B?TkFPWUEo5aCA5Y+jIOebtOS5nyk=?= , Hugh Dickins , "Kirill A. Shutemov" , Matthew Wilcox , Oscar Salvador , Andrew Morton , Linux MM , Linux FS-devel Mailing List , Linux Kernel Mailing List Subject: Re: [v3 PATCH 2/5] mm: filemap: check if THP has hwpoisoned subpage for PMD page fault Message-ID: <20211008093529.sb54gnlbhuiy6klr@box.shutemov.name> References: <20210930215311.240774-1-shy828301@gmail.com> <20210930215311.240774-3-shy828301@gmail.com> <20211004140637.qejvenbkmrulqdno@box.shutemov.name> <20211004194130.6hdzanjl2e2np4we@box.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: C2D7E1000AB6 X-Stat-Signature: xm6kxnnyiacq5b5wqkihsia6yfu9dtma Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=shutemov-name.20210112.gappssmtp.com header.s=20210112 header.b=XG4XQgVj; spf=none (imf12.hostedemail.com: domain of kirill@shutemov.name has no SPF policy when checking 209.85.167.52) smtp.mailfrom=kirill@shutemov.name; dmarc=none X-HE-Tag: 1633685732-676854 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 06, 2021 at 03:54:16PM -0400, 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, JFYI, git blame -w ignores whitespace changes :P -- Kirill A. Shutemov