From patchwork Tue Feb 14 03:18:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 13139320 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF063C636D4 for ; Tue, 14 Feb 2023 03:18:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 35B146B0073; Mon, 13 Feb 2023 22:18:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2E3C5280002; Mon, 13 Feb 2023 22:18:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1D282280001; Mon, 13 Feb 2023 22:18:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 0AA016B0073 for ; Mon, 13 Feb 2023 22:18:33 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id D62C880897 for ; Tue, 14 Feb 2023 03:18:32 +0000 (UTC) X-FDA: 80464439664.25.3FAAA4E Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by imf15.hostedemail.com (Postfix) with ESMTP id E0DE2A0002 for ; Tue, 14 Feb 2023 03:18:29 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=none; spf=pass (imf15.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.131 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676344711; a=rsa-sha256; cv=none; b=3mofUHS+i3UV75KmaE6guAltjmyE4KbsBYLm9DEzw8gqxzrXbpSSJKrVvxIejeR5bvT4mW AVM0RuTCNhrdsLEMFhyUsTqFLQRmyFT73juEhecE3iSkRRQ1LjXOKn/pfRP1WPyUWnMAyS ErYiI52bbAqRqzS2hR4hAxiIg7rxRqY= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=none; spf=pass (imf15.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.131 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676344711; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=QimAzLY5kSup6/981xc0+DSkuZuDXRm77c7CFQArEqk=; b=dmggHUk45UTXq9l5KNU5e4hMTH6HTq2E42fMY3/xxDdtBlf5YPforP1rg7Y8R7Xqj1Apyz FzdupRD74oErwMK5hK6wp4J4fhW3XhPr8rS2tXnEdOdR1mpLt2yvz3CiDFm3NcsrZ32qf7 dziegmGnIorYYue1jkLzzJb4d4UY5Ls= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0Vbe-fxI_1676344705; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0Vbe-fxI_1676344705) by smtp.aliyun-inc.com; Tue, 14 Feb 2023 11:18:26 +0800 From: Baolin Wang To: akpm@linux-foundation.org Cc: torvalds@linux-foundation.org, sj@kernel.org, hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev, shakeelb@google.com, muchun.song@linux.dev, baolin.wang@linux.alibaba.com, damon@lists.linux.dev, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/3] Some cleanups for page isolation Date: Tue, 14 Feb 2023 11:18:05 +0800 Message-Id: X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Queue-Id: E0DE2A0002 X-Rspamd-Server: rspam01 X-Stat-Signature: ah7nwh39qa353gkwnpgjb8cen5y681qs X-HE-Tag: 1676344709-767846 X-HE-Meta: U2FsdGVkX19h9kIE9Aom9iLvwN8VnSeHbWHuVXqC3Y+eEa0BhW/84dMtraqzB7/yEzEvDQnxIOVOxsIHvSgYmkFzJMHDDkC9Rk6vU0sAbt7/+V+OA5ZPQfTrPTOkQBK9DkHFP5TbjqwoZx7stnsbX0gB/OSwTTt753tBc22dhGCCwrcc505A/9lYiypVFn7enX46H53N0SCFrSOBwgmFLgXKFKbliT3nKHvFyssNYhmsZqlPr9Muo0Ikx7Gf1hZLUZKTJgrsx9dKvlY4kgIzPwAEjtf4wnfkVlixuWVMovCoLFz2+kgodO6lmOKoraEpoq6/fjR4RK/BdYc97fGVkTMVy3t/SgIipr6zHZQfj6+hEXAiE5fdX24wlq9AJjpeN9Z3LcuVWMfBhpvv6ULbUo6DBiVhyoDf5iUFOdog8N0ITZa1I/RLgThRAMTsafj3/e+SQmDlxfuAeYW0zIq/YdjN7kJEXaN6rhkNtp/6z2+81IOzKffg0uOMiNxkMgYmoZ3WGWt+Nrcux7w6kHAtHwVMHu8+OYRVakjIpnpU79nU3iSBRqmhRwhzxQgwb7ByL8CRpaqnK5CdPd/PCgdhstWqx3uOh+jA06qa6kJldH5kykRRldrCbAq3C7I5nTcuzBZmC3niY59Ak6niii8NkWT0+dHnUqGtyC5gmYJupdnXDqLWZVy8N1wUQ/4lcrlZZKvpJWBMAkoKf8Ij0cEdQdY5E5W1zM1jHInVSJgheWaPFeag29lzsQAhwtjumCBIeFepebfWb5ZNK64BBGpSHkKHt10qxaOaaMygtueFL6c2YZ/+G2rAY1FEcFTedQISJP6UwHPV6xeUA/cXqJtpeNXurGGq7fFcP7lIzWyO0uF12qs6K97LJW9991iC78b/u+PgxIKI9q4cqakexd5n3HWOkdhm4VZlyahVr6AD75k/nMmUpMqhnKG7NM7F8vI9kyCrPP1TPNif1pbxEr8 uH4kwgHi Wm34xkRnZ0GEbGgjI/H3wQa5JTV7CRlmvyMhbtN8eKs+tmbR17Zux7Aws31Tz92paOsiLtecYZggp5mftOJ/mcjIF8YnHvzXIKGYXuvdZ3YdYRGQFd1x3DHx1DQu4wdHT5heHp7sgPM+PvuEFAJhlSZa+eth4CL5QxeRJydlJc6cUZs4= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, The page isolation functions did not return a boolean to indicate success or not, instead it will return a negative error when failed to isolate a page. So it's better to check the negative error explicitly for isolation to make the code more clear per Linus's suggestion in [1]. No functional changes intended in this patch series. [1] https://lore.kernel.org/all/CAHk-=wiBrY+O-4=2mrbVyxR+hOqfdJ=Do6xoucfJ9_5az01L4Q@mail.gmail.com/ Baolin Wang (3): mm: check negative error of folio_isolate_lru() when failed to isolate a folio mm: check negative error of isolate_lru_page() when failed to isolate a page mm: mempolicy: check negative error of isolate_hugetlb() when failed to isolate a hugetlb mm/damon/paddr.c | 2 +- mm/gup.c | 2 +- mm/khugepaged.c | 4 ++-- mm/memcontrol.c | 2 +- mm/mempolicy.c | 2 +- mm/migrate.c | 4 ++-- mm/migrate_device.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-)