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 X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A97CFFA374F for ; Tue, 5 Nov 2019 09:50:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 64564217F5 for ; Tue, 5 Nov 2019 09:50:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bzeZp7Ir" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64564217F5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1807A6B0007; Tue, 5 Nov 2019 04:50:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 130AF6B0008; Tue, 5 Nov 2019 04:50:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 06DB16B000A; Tue, 5 Nov 2019 04:50:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0204.hostedemail.com [216.40.44.204]) by kanga.kvack.org (Postfix) with ESMTP id E75C16B0007 for ; Tue, 5 Nov 2019 04:50:16 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 6CA5BDB4B for ; Tue, 5 Nov 2019 09:50:16 +0000 (UTC) X-FDA: 76121753232.14.prose21_3c8c19aa20c5b X-HE-Tag: prose21_3c8c19aa20c5b X-Filterd-Recvd-Size: 3749 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Tue, 5 Nov 2019 09:50:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572947415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BGggv342lFx1tfwwl12Nk/iZ58G5iqriqTxQgLV8zo8=; b=bzeZp7Ir7grQtRK9OQRYcgX/e/aXCxamU0PPyZyLvDgP9og8ThdtTYrAm4ymXvQgQSGEud owgNwJAX5cXlcJiTCpmEoU34cnxWc6OSSxAERE+KCqNurpcYWlfTVOAx5i6IQcviaJWUGz itfJ0cMpB1EsBc+SW90rxbih8Q7twkA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-340-SL926ai3PRGUG_s0dpBfZA-1; Tue, 05 Nov 2019 04:50:11 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 261A0800C73; Tue, 5 Nov 2019 09:50:10 +0000 (UTC) Received: from [10.36.117.253] (ovpn-117-253.ams2.redhat.com [10.36.117.253]) by smtp.corp.redhat.com (Postfix) with ESMTP id B83D060CDA; Tue, 5 Nov 2019 09:50:08 +0000 (UTC) Subject: Re: [PATCH v2] mm/memory-failure.c: replace with page_shift() in add_to_kill() To: Yunfeng Ye , n-horiguchi@ah.jp.nec.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, "hushiyuan@huawei.com" , "linfeilong@huawei.com" References: <543d8bc9-f2e7-3023-7c35-2e7ed67c0e82@huawei.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Tue, 5 Nov 2019 10:50:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <543d8bc9-f2e7-3023-7c35-2e7ed67c0e82@huawei.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: SL926ai3PRGUG_s0dpBfZA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable 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 05.11.19 10:38, Yunfeng Ye wrote: > The function page_shift() is supported after the commit 94ad9338109f > ("mm: introduce page_shift()"). >=20 > So replace with page_shift() in add_to_kill() for readability. >=20 > 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=20 code/documentation changes. Andrew will apply the tags when picking up=20 the patch. >=20 > mm/memory-failure.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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, stru= ct page *p, > =09if (is_zone_device_page(p)) > =09=09tk->size_shift =3D dev_pagemap_mapping_shift(p, vma); > =09else > -=09=09tk->size_shift =3D compound_order(compound_head(p)) + PAGE_SHIFT; > +=09=09tk->size_shift =3D page_shift(compound_head(p)); >=20 > =09/* > =09 * Send SIGKILL if "tk->addr =3D=3D -EFAULT". Also, as >=20 --=20 Thanks, David / dhildenb