Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp586744ybx; Tue, 5 Nov 2019 02:20:55 -0800 (PST) X-Google-Smtp-Source: APXvYqyAy8XSfJ+S5kixGAGih6n9DlnjAOXhx9xlT9YHYFknA/ATPGxVMQ2F27IXHdp4DVjJ+IHD X-Received: by 2002:aa7:cf97:: with SMTP id z23mr21194391edx.245.1572949255459; Tue, 05 Nov 2019 02:20:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572949255; cv=none; d=google.com; s=arc-20160816; b=lN2E7hQA3JVTtXAu1ZN3Ik0+W52Ju5V/b7KoiHyNiZTZcvC1f+RaXbXl7x5rfTJjrf zALUoQ//T7MSL42UzLPMTNG1LweGpvF0un2yYSaBUKL/y6F6PPVXgUWFcogEkx1OSMmw qGxBoRRgvke8z2MET1zwezy74GI+ikc55VmJMQufPuVRqGAt1mgeeFYG6WSCdvcbxO8O lIl6wjXRgkukrTdUhZJhm9cJUxmMb3+EJjtbAgw5YinydraaaH0i7ZZ94wJMY7SU5+Ps RIK3FbPaWWfLoXwlmfxAlj9OcgePbNH8Ix9FVH7OseUAwsivs0XnrKVYezC0inluoP0Y VbZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=KbNQwdL2YlocB/2FrOAOGgJK4BOZz/fc3DjJBwxR9IU=; b=L9A66yZanj9eC6LGIBu295z1eYBYBGAejfGdH6vA+XpSxFmLOQ9MUIHNerQd9tKaqF S5iYpefnhnax/VpqcwJGTeGMi4Q8C8biD9/y4Cm7vLw1mqs/3N9CelApCxOFgWnyJPpS QF9gzrVzv8YV8tYmkrmWgjcAEzD+KjPaCU1L4+5WGwK0YcwTZn6WYewHIQWQALMeJsxv BbCEAgbVHVBtn1sLVmnkZxESXbUkZPs2tMW/0x9y9yff1h4xommb213EQRc7ZlSQxe+i tGInA047sPx/JkhFXJq4N2wwfsDHbQrTueG9L/gO0dcWKNEyd8REWh+zX+V0M17zRXnd HWDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t17si13648967ejj.144.2019.11.05.02.20.32; Tue, 05 Nov 2019 02:20:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388514AbfKEKTL (ORCPT + 99 others); Tue, 5 Nov 2019 05:19:11 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:5706 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388283AbfKEKTL (ORCPT ); Tue, 5 Nov 2019 05:19:11 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 7C982204E6E447042405; Tue, 5 Nov 2019 18:19:09 +0800 (CST) Received: from [127.0.0.1] (10.177.251.225) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Tue, 5 Nov 2019 18:19:01 +0800 Subject: Re: [PATCH v2] mm/memory-failure.c: replace with page_shift() in add_to_kill() To: David Hildenbrand , CC: , , "hushiyuan@huawei.com" , "linfeilong@huawei.com" References: <543d8bc9-f2e7-3023-7c35-2e7ed67c0e82@huawei.com> From: Yunfeng Ye Message-ID: <0220b5ff-bc47-9616-3897-52fa1c674487@huawei.com> Date: Tue, 5 Nov 2019 18:18:49 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.177.251.225] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/11/5 17:50, David Hildenbrand wrote: > On 05.11.19 10:38, Yunfeng Ye wrote: >> The function page_shift() is supported after the commit 94ad9338109f >> ("mm: introduce page_shift()"). >> >> So replace with page_shift() in add_to_kill() for readability. >> >> Signed-off-by: Yunfeng Ye >> Reviewed-by: David Hildenbrand >> Acked-by: Naoya Horiguchi >> --- >> v1 -> v2: >>   - add Reviewed-by and Acked-by > > Note for the future: No need to resend if there were no code/documentation changes. Andrew will apply the tags when picking up the patch. > ok, thanks. >> >>   mm/memory-failure.c | 2 +- >>   1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/mm/memory-failure.c b/mm/memory-failure.c >> index 3151c87dff73..e48c50cac889 100644 >> --- a/mm/memory-failure.c >> +++ b/mm/memory-failure.c >> @@ -326,7 +326,7 @@ static void add_to_kill(struct task_struct *tsk, struct page *p, >>       if (is_zone_device_page(p)) >>           tk->size_shift = dev_pagemap_mapping_shift(p, vma); >>       else >> -        tk->size_shift = compound_order(compound_head(p)) + PAGE_SHIFT; >> +        tk->size_shift = page_shift(compound_head(p)); >> >>       /* >>        * Send SIGKILL if "tk->addr == -EFAULT". Also, as >> > >