Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp510885ybx; Tue, 5 Nov 2019 00:59:18 -0800 (PST) X-Google-Smtp-Source: APXvYqxJPgaoOFnGzpFl0+Ka3gDh71a00wRU5CuO2EWbe9xS0SOcVrcdj8M9NqEOM2D94sIgY7MR X-Received: by 2002:a17:906:5015:: with SMTP id s21mr27498380ejj.226.1572944357993; Tue, 05 Nov 2019 00:59:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572944357; cv=none; d=google.com; s=arc-20160816; b=d9Y1GF2xImGqPRsWCBSWbCPdL9H9vFHQUUZ94rWdvrtzI6x7UYegC6c7J+wGpnuyWJ ljD//aP3SoJMZ/4ED7+QUYNSR9qMdKdRkJm7xDvDlpNuL2YxZLjoqlTXyZ+kldzQ7hFY tk3M4wPpDelBqc/glAJ5vt1tMmKYND6IJd2xT2fBqN+M5MwiQA02G5jE5DeiiCq2tTqX e7JW2f0rTOsRfPutbnMZFlEI5sp7HaZwRxGRWzv/u3ZNlk6T93plrZHI1ZXsPbpTLcH/ 8KtxV2DHFt3aYHrXTogoRAxkJV11VOdLDvWUg+Bh2xjo+j8Y5o9jftZpE7Rn6x2RnwQC dddg== 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:organization:from:references:cc:to:subject :dkim-signature; bh=r5Y8efObvDU60RISxdiJngQGMPQkFpy+gNbh+IZW5yM=; b=MYcGGdbTwKJ9lz4XRkdbfNDRwBK/c0MX5T50GFVt75uJ03ndJbfsZKbczG2ocTfdJS guHZ4dT7fkFFD9kqAinjuBC8ZISCfisXi7Gor1wuC9mqnhGtSTmP7n4qckxhF9nkEeiw W86Dr8n2X5Q9uzKdTwMC6HMMDBKVIIh2hBnLLkE4CePBFMAZNGQW3u1k2eV5PMiRBLh5 SgSBdJZ9z3dBe2QSUYZb9cOm9QYEE5Tc+J61CF9130kTrlATl1ho7oEaqpnyjOBm5GQT YAvgiF5IAvKIvUNiMp68QwEMxzAHYED/rQQ/m1w8JjG0BCvxUnfHCXpASsiMYKpbD9PI FAug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WUwGCZQ4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ss14si6773870ejb.195.2019.11.05.00.58.54; Tue, 05 Nov 2019 00:59:17 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WUwGCZQ4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730560AbfKEI6I (ORCPT + 99 others); Tue, 5 Nov 2019 03:58:08 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:28892 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727925AbfKEI6I (ORCPT ); Tue, 5 Nov 2019 03:58:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572944286; 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=r5Y8efObvDU60RISxdiJngQGMPQkFpy+gNbh+IZW5yM=; b=WUwGCZQ4ymPoiNakObeAqFDC5XbVUKkxF0AWleOEp2Y5UUMpFK9Z51e13C8Bn5W50hvGQZ GA2E2WKZNTP89vTaCzFJbLMUjNyZaNZK/Eh8JH542p58UdR5ldC5X2SmMXSYbvzeZdSPbu BkqaM9zSaD/PH0Fy3paTd5Eer02FRJw= 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-236-16T4VLGAMFeiFaZDGSE4Vg-1; Tue, 05 Nov 2019 03:58:03 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8CE9D107ACC2; Tue, 5 Nov 2019 08:58:02 +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 D90FE608B5; Tue, 5 Nov 2019 08:58:00 +0000 (UTC) Subject: Re: [PATCH] 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: <7bc9d610-728c-37b0-d175-dba21dc0dfff@huawei.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Tue, 5 Nov 2019 09:57:59 +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: <7bc9d610-728c-37b0-d175-dba21dc0dfff@huawei.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: 16T4VLGAMFeiFaZDGSE4Vg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05.11.19 09:21, 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 > --- > 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 Reviewed-by: David Hildenbrand --=20 Thanks, David / dhildenb