Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp952008rdb; Sat, 7 Oct 2023 06:02:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGjPP4kye5HEj8CYwt+U22i4cBo0xG8iaJ9ukn+Ow97wR95LwrMrDWcIUtE4OiLzP9tO86s X-Received: by 2002:a05:6a20:7286:b0:15e:7323:5c0f with SMTP id o6-20020a056a20728600b0015e73235c0fmr13473463pzk.16.1696683738138; Sat, 07 Oct 2023 06:02:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696683738; cv=none; d=google.com; s=arc-20160816; b=JcexQVCD9IsHbV2z4QLOzVakANXIYvmPvryOMJyRi46lwl/6VSHw48r6SZMXUJZ3+Q EGH7gLkG8/yY6pSRVc8Y5TE0EpIeVDZaG2ndeixX0xjh2jJaOv4WUbgMPyxHmeoIVjkN u+nYw98NO68JmPOwBPXPDpyOvPukNrTgbyxG2sPG0hHi5rUZQfHyySpD3YUWuhkKQsQk qPYwBf1dYmMHNrzI++MNQm+hxBt02ucbQ3bLyxg6m6R623SinAyKeeDUw9jdIUJajAmU JWQgnYsS7/oQ96umw2jJJsWOJFHmPajneijZF+5D4QEXBXWxYrv/TFZaNyqmYNtZFTDT E/HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=6Erz/QGEL0Ri+RPbZCAmApajj6xOeZlOge+OPkSIK4g=; fh=HOcXEKwjYqwQ+meECz1/0jCaDvKjcccrvgdw+EXoox0=; b=Vek5cjVu42FUYc6r2HlFBEC82MmvhJQhCJuGTxA4Ze5yZdu7n8zRElGJR2DVzPE+d4 RJ5HuSnCIc1FuzvDG8J/krtDNxHE2mEnvCCqzkNnpXWbcB7Puje7wdJ97dUf1fhYMUXa /CgnCiezVpXkAYju8iovXF1lqhlGEJIF2pJG6ocNF4gDP06pevFpty+ZLL+gmBRNV0i1 ojhADX/N0tnXfM0OInlxnYpiW5OZagqPgPC3azHfEu0oyzGhh+p3vCl3w1JHZqNlsZsV YkSydWOKKrJKHSJkE7yiJhgb7hdPu2yAbWDi9yb4oZKQEr2bPuc+JLyDc5MeDDwefG5g 46Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b="Wl/YS/3c"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id a42-20020a056a001d2a00b00693394f5d92si3490144pfx.316.2023.10.07.06.01.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 06:02:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b="Wl/YS/3c"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id CA68080BCBAA; Sat, 7 Oct 2023 06:01:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343942AbjJGNBA (ORCPT + 99 others); Sat, 7 Oct 2023 09:01:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343741AbjJGNA6 (ORCPT ); Sat, 7 Oct 2023 09:00:58 -0400 Received: from mailo.com (msg-2.mailo.com [213.182.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AEA1C2 for ; Sat, 7 Oct 2023 06:00:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1696683633; bh=6e/J14qgrz5/5aSBCNVxqNF6zVd6jEJWQXAXSY4IkQs=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To; b=Wl/YS/3c1/JXS9cetGFFrgwJM4to1+2/hZSU41yumdXep8sVGnd2NwUKQqvfJL1Es ERE2lEUgaUMAO9iQ3VwKlYKrK9L+VG+4watCndLoHV9j8lcnLVBFSOtUe40Avp+D6s DMOwvjnWgnzDTU7r2mBBXGgtdD+3cbLwBMgNB3Ps= Received: by b221-4.in.mailobj.net [192.168.90.24] with ESMTP via ip-20.mailobj.net [213.182.54.20] Sat, 7 Oct 2023 15:00:33 +0200 (CEST) X-EA-Auth: CAve3YZ/hZSuwfASOt92PtmM7Xx8xFaK9CD6lQ30TkqPKvGUURv8G1rIc+WBPmvrICkK34P+vUG14I6ddiREXgxjMkykTT5H Date: Sat, 7 Oct 2023 18:30:27 +0530 From: Deepak R Varma To: Huacai Chen Cc: WANG Xuerui , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Ira Weiny , "Fabio M. De Francesco" Subject: Re: kmap() transformation: Question about copy_user_highpage Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sat, 07 Oct 2023 06:01:12 -0700 (PDT) X-Spam-Level: *** On Sat, Oct 07, 2023 at 12:55:14PM +0800, Huacai Chen wrote: > Hi, Deepak, Hello Huacai, > > On Sat, Oct 7, 2023 at 2:46 AM Deepak R Varma wrote: > > > > Hello, > > I am attempting to work on replacing the kmap[_atomic]() calls by > > kmap_local_page() function call. A detail on this change can be found here [0]. > > > > I would like to know if this function: > > arch/loongarch/mm/init.c::copy_user_highpage() > > is currently in use or is it a dead code? > > > > If this code is not in use, can this be removed instead? However, if it is in > > use, can you comment why kmap_atomic() was preferred over kmap() > > function call? > I think this function will be used for the 32bit kernel, and we will > add loongarch32 support in the near future. Okay. Sounds good. > > But on the other hand, you can replace kmap_atomic() with > kmap_local_page(), there is no special reason to use kmap_atomic(). Looks like you sent in a patch. Thank you. I was working on trying to cross compile my patch for the arch. I still would like to attempt that. Will request your help if I get stuck. regards, deepak. > > Huacai > > > > > [0] https://lore.kernel.org/all/20201029222652.302358281@linutronix.de/ > > > > Thank you, > > Deepak. > > > > > >