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=-6.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 81495C388F9 for ; Fri, 23 Oct 2020 06:39:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 94D702192A for ; Fri, 23 Oct 2020 06:39:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="RIIbsnBZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 94D702192A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A1B966B005D; Fri, 23 Oct 2020 02:39:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9CC996B0062; Fri, 23 Oct 2020 02:39:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8939B6B0068; Fri, 23 Oct 2020 02:39:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0071.hostedemail.com [216.40.44.71]) by kanga.kvack.org (Postfix) with ESMTP id 5AB576B005D for ; Fri, 23 Oct 2020 02:39:06 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id E0B453628 for ; Fri, 23 Oct 2020 06:39:05 +0000 (UTC) X-FDA: 77402237850.29.crime73_4d0837a27257 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id BE60718086CC7 for ; Fri, 23 Oct 2020 06:39:05 +0000 (UTC) X-HE-Tag: crime73_4d0837a27257 X-Filterd-Recvd-Size: 5107 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Fri, 23 Oct 2020 06:39:04 +0000 (UTC) Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09N6W2UJ089682; Fri, 23 Oct 2020 02:38:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=pp1; bh=jSBqA2Xb3V1/Ng9IC6LYQAyTgeWhz3BE+u4Ec2ULnY8=; b=RIIbsnBZdhOxViKe35KEpsxpaWFN337S8ywDtrfjw/NPZy0YoaO+TEzRpbyU+TgszFl3 c57LIw7yHyPdlc8SD/VerGAX3Tie4+kWSU/r0Jmz5oRVepVhygEglqd/lYZJx8Hf1dVO lA0QzJE2CJ4tbCCQblpda5Dm2jzBwlQv7uG6uu34mLQuLOW3YHmaAnccTbUjvMY1+Ixh NFYWtPRLCppvEUFMoeeuRDtWiMmUNNv7KVi7iuj5F8u6a787k87kS/iMpvDbkyZfVFNQ 9iMtNnUmi3ASlE3l8S+1bnZ2UHZn1FxRwkK8m1fdXVkV2r5V+CgQ9YUTxJB0GW6oFwQS Ng== Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 34bseq0w5b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Oct 2020 02:38:58 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 09N6QehN016505; Fri, 23 Oct 2020 06:38:56 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma04ams.nl.ibm.com with ESMTP id 347r88e8wc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Oct 2020 06:38:55 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 09N6crUF33489394 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Oct 2020 06:38:53 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B2ECFA405C; Fri, 23 Oct 2020 06:38:53 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 36999A4054; Fri, 23 Oct 2020 06:38:52 +0000 (GMT) Received: from [9.85.95.180] (unknown [9.85.95.180]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 23 Oct 2020 06:38:52 +0000 (GMT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: [PATCH] mm/mremap_pages: Fix static key devmap_managed_key updates From: Sachin Sant In-Reply-To: Date: Fri, 23 Oct 2020 12:08:51 +0530 Cc: Ira Weiny , "Aneesh Kumar K.V" , linux-mm@kvack.org, akpm@linux-foundation.org, Christoph Hellwig , Dan Williams , linux-nvdimm@lists.01.org, Jason Gunthorpe Content-Transfer-Encoding: quoted-printable Message-Id: References: <20201022060753.21173-1-aneesh.kumar@linux.ibm.com> <20201022154124.GA537138@iweiny-DESK2.sc.intel.com> To: Ralph Campbell X-Mailer: Apple Mail (2.3445.104.17) X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.737 definitions=2020-10-23_03:2020-10-20,2020-10-23 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 impostorscore=0 mlxscore=0 mlxlogscore=932 malwarescore=0 spamscore=0 priorityscore=1501 suspectscore=0 bulkscore=0 phishscore=0 lowpriorityscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010230044 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: >> Is it overkill to avoid duplicating this switch logic in >> page_is_devmap_managed() by creating another call which can be used = here? >=20 > Perhaps. I can imagine a helper defined in include/linux/mm.h which > page_is_devmap_managed() could also call but that would impact a lot = of > places that include mm.h. Since memremap.c already has to have = intimate > knowledge of the pgmap->type, I think limiting the change to just what > is needed is better for now. So the patch looks OK to me. >=20 > Looking at this some more, I would suggest changing = devmap_managed_enable_get() > and devmap_managed_enable_put() to do the special case checking = instead of > doing it in memremap_pages() and memunmap_pages(). > Then devmap_managed_enable_get() doesn't need to return an error if > CONFIG_DEV_PAGEMAP_OPS isn't defined. I have only compile tested the > following. >=20 > Signed-off-by: Ralph Campbell > =E2=80=94 This patch fixes the warning for me. Tested-by: Sachin Sant -Sachin