From patchwork Sat Apr 11 22:03:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 11484239 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 667B692C for ; Sat, 11 Apr 2020 22:04:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 28DC62051A for ; Sat, 11 Apr 2020 22:04:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="b34uiPk8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28DC62051A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5B2428E00B3; Sat, 11 Apr 2020 18:04:25 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5617A8E0007; Sat, 11 Apr 2020 18:04:25 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 49E608E00B3; Sat, 11 Apr 2020 18:04:25 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0105.hostedemail.com [216.40.44.105]) by kanga.kvack.org (Postfix) with ESMTP id 2FEAF8E0007 for ; Sat, 11 Apr 2020 18:04:25 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id D7E942C8B for ; Sat, 11 Apr 2020 22:04:24 +0000 (UTC) X-FDA: 76696953648.22.bikes47_60b947a9b2510 X-Spam-Summary: 2,0,0,7c77bc8a50d63449,d41d8cd98f00b204,richard.weiyang@gmail.com,,RULES_HIT:41:69:355:379:541:966:968:973:988:989:1260:1345:1437:1534:1540:1711:1714:1730:1747:1777:1792:1963:2196:2199:2393:2559:2562:3138:3139:3140:3141:3142:3350:3865:3867:3868:3871:4362:4385:5007:6261:6653:9413:10004:11026:11658:11914:12043:12296:12297:12438:12517:12519:12683:12895:13053:13069:13161:13229:13311:13357:13548:14095:14384:14687:14721:21080:21444:21451:21627:21666:30054:30070,0,RBL:209.85.128.68:@gmail.com:.lbl8.mailshell.net-62.18.0.100 66.100.201.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: bikes47_60b947a9b2510 X-Filterd-Recvd-Size: 3469 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Sat, 11 Apr 2020 22:04:24 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id e26so5879617wmk.5 for ; Sat, 11 Apr 2020 15:04:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=QMdbDycZrI66Fi6FRwlCFSGbMp0sxstyHyqa3xK8LHE=; b=b34uiPk8DspIRoaI9c9aiomfii/cLTu7bX5PVltOE8SOJ5d5Es3i5PYKW+sWtc0b5L bDRvSPOYP9q6DRCOtHZODpDMbzEgKQvlAyW3GPOLawRWvbHDZSMtMNKVu+1ghxstAQN2 AcKDFSFTv5+tH7QbyhgkqF7Zuh/iYttF+Ga+9WKDPq4cHo0S9Hos3iSWcQez2yJO7/e1 trBvvZMQDr4iO+mHO2JZ0mD1GP5IoG+gMmhmfNdtmuX9r5aH6K/LUTzM4Z8fs3QcirMp x7ljeF/2xJk/mEN2G+mj953+sNd4jwfqqnR+AA698bGUyCkbHugqPJVeXKebnNy/FXMI lFvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=QMdbDycZrI66Fi6FRwlCFSGbMp0sxstyHyqa3xK8LHE=; b=HENW7AhtPr+IjhRds7cghaxdgSLb7pjv5QpWynJon4R+Vza4g73WG8Le8xq/tv6PEl 7EuPozDLrIpVNcGKjggXjIbYzjWwRKb1Pz04Pa3rp+x5E8JjXztkvfZnRAIO+8Q6gasK cxbFMk+wynNpKWOCNcIdbzLB3+4KggYP0kctgZgv2mj7QSZhTkBfK4XMy+V2i6ETk4pt JrABZU14vDcHpRgwlD90HBW5tCzklAQcAsYpTtA+gEZtZSgpReJNDPg5eL8zj56slzVY jA9QBl646nqjLTFlCp05egq8D1C8amlJAqNTfM6m/kc4CHBMZl0ib5u7kNe6G8Yvazh/ kEmA== X-Gm-Message-State: AGi0PuYYzHn/ub0iq5cgbE4I9/eMkdQ81Le4DPbd3sobmekNSawZVqZb aO06BA5/0MHmKXHxsfaDaJ8= X-Google-Smtp-Source: APiQypJ82oh4/G08ff48aHX9dGZ3bYQ8b8lp5rlV0inaqsaWiN27iHoABuUrsxN6SWGuH/lBn9Q++A== X-Received: by 2002:a1c:1bcb:: with SMTP id b194mr12052738wmb.4.1586642663437; Sat, 11 Apr 2020 15:04:23 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id g74sm8338160wme.44.2020.04.11.15.04.22 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 11 Apr 2020 15:04:22 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, rientjes@google.com, anshuman.khandual@arm.com, david@redhat.com, Wei Yang Subject: [Patch v3 0/5] mm/page_alloc.c: cleanup on check page Date: Sat, 11 Apr 2020 22:03:52 +0000 Message-Id: <20200411220357.9636-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 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: The patch set does some cleanup related to check page. 1. Remove unnecessary bad_reason assignment 2. Remove bad_flags to bad_page() 3. Rename function for naming convention 4. Extract common part to check page Thanks suggestions from David Rientjes and Anshuman Khandual. Wei Yang (5): mm/page_alloc.c: bad_[reason|flags] is not necessary when PageHWPoison mm/page_alloc.c: bad_flags is not necessary for bad_page() mm/page_alloc.c: rename free_pages_check_bad() to check_free_page_bad() mm/page_alloc.c: rename free_pages_check() to check_free_page() mm/page_alloc.c: extract check_[new|free]_page_bad() common part to page_bad_reason() mm/page_alloc.c | 74 +++++++++++++++++++------------------------------ 1 file changed, 28 insertions(+), 46 deletions(-)