Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4423046ioa; Wed, 27 Apr 2022 03:38:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxxOpmFBjXUqGAjv3n9qL5CI1lb3uxTr+6SZLbkFzZuv+Ua7kgDVKE1uwpqIjBSRfunLff X-Received: by 2002:a63:4549:0:b0:39d:8041:53a6 with SMTP id u9-20020a634549000000b0039d804153a6mr23274186pgk.501.1651055902631; Wed, 27 Apr 2022 03:38:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651055902; cv=none; d=google.com; s=arc-20160816; b=Muz351dxn/Cxx3/XrK4YJpN0z5BUTdWOTUd+QNjvtdc+BWaxYX92FEJB7VHjdVtxKB iKC69ZXIJZtdnkcmV0sXyHfASh5RHzmhxeHgxhFTyXVG+nLBs165VKRXXxBT7PSmm/Ew Z+R+OdHqTQUz3zcwJiiNED6TELDhA4OXbr+ecm0YBUxuIdzMYsGM9ziPcuQ0/lFuW32I vPBT7OSqDKhcLmAM4TuudJn9mfGnhXCOLDF+MUHnxG3rudxZUuLnJbksrP4NPHsjjUg/ 0/xykTHRxWDjVuldx4X3wTBawRc4mo6Ab0N3+GT3PKtj0ZenSxyhlrCASOFUzLp6ksUH 0dRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CtivK/lbjkFn6fCJitHMAm73ZL6+X5IagBxOgsbgoFw=; b=0olBcmoyKSiUuN4//3JsPp1fK5dHcY6XlQIOcL6Y8S64hJxAUCWQyYgIgSMotneBfP mQnxDbIFLoUpVBFgkq/SwQ1kIe4cGVDtVyZ1HSx/fFiW6EO0stJPxjlm6DwyxriaFc76 AayUq4B3GBqdaYM6LwTmUHolQHUSVSwR8lWubKy15s9r1h3MtPhcQXBoH1yswVNoEv42 TV//rL1S/Q2niPoJ6z90Cb+hUGbU+uMeTH8oO/+YBBapok71Lbr4zdDWGSVx1o1iZOPL WqAvgCXYFxf+Yy+rTmYxZvikb2HSBtJyhkC7a68GwEkOvVCJ4xmm5cobEX053S3eMesa ZgEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ah1fX5Yh; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id a14-20020a63e84e000000b0039da27d8d13si1153367pgk.245.2022.04.27.03.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 03:38:22 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ah1fX5Yh; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A8FAB3CE9BF; Wed, 27 Apr 2022 02:49:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351391AbiDZSed (ORCPT + 99 others); Tue, 26 Apr 2022 14:34:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351058AbiDZSe3 (ORCPT ); Tue, 26 Apr 2022 14:34:29 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC0C91CB17; Tue, 26 Apr 2022 11:31:17 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id e23so2384842eda.11; Tue, 26 Apr 2022 11:31:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CtivK/lbjkFn6fCJitHMAm73ZL6+X5IagBxOgsbgoFw=; b=ah1fX5YhJKRbkl+xlw+Gun6kLxP6FBDciSqczj3fapwkuEbS7nsMr7mlTDVtKJ1EUl CvYuRt7OKaa2x4WC3Ov4dKXFA91FO0RGO2RCrJhnO9TZa0V9JmgcNWreiw0dpFxJiEto oCU5egWOMJr9SFwZhP8ZpezrzNDQLbQkflTlcFhzqz7y6XdzaH5LqWR4edEyGlnishXZ 5ymYVmGlemkREtdQoT/iYs08oFnqCVoD/t5MrcqZfyK/u129VbxWppE5lb1+bwf1RWK6 L9UpILm7HT1PkQXpP/8IPzwCfNBUBwE10QWwativi/VOGN0tn4iUIRYc400hEhugKVey tHHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CtivK/lbjkFn6fCJitHMAm73ZL6+X5IagBxOgsbgoFw=; b=BAiJwGLRAtj5/fy6s5viLF0aHkkayHE9Dd4d15523jJInO0SXJzUjMbFKTuKYS3R9J tH+1HRFCLK24fH20DQo9dZxdlEakbGlU4+xFJkDYqC3eNGAxAFE+vLLaal7ULuMVEIHF v7VORL6hz/L8YEJkDmjk3+t7GLez8FkuDBkbtYDaLABDZH3u9PIQRTcCdCrwcSjBLgt3 zsoLw109jOrXtt0KnooXbGCuBVjzk0UDFnk3SXU7HyPEMsJsILk/qbNoGoMABpXCxTsA 4rnlyvUIIYeYEG4iLc049/sNplrbUL9xj7GJDyMRWeepVl9G4VPjdcluQCjKvddpmjik Gjeg== X-Gm-Message-State: AOAM531cR6wV+1sxdRdXhSD3pEZXXUu+RxXjtUeASTqd+w+5OUVMuq/Q rRNlt5NVyBZWIFp+ISPrqDE= X-Received: by 2002:a05:6402:2318:b0:413:7645:fa51 with SMTP id l24-20020a056402231800b004137645fa51mr26535565eda.201.1650997876370; Tue, 26 Apr 2022 11:31:16 -0700 (PDT) Received: from leap.localnet (host-79-50-86-254.retail.telecomitalia.it. [79.50.86.254]) by smtp.gmail.com with ESMTPSA id d11-20020a1709067f0b00b006f395247b5esm2817517ejr.84.2022.04.26.11.31.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 11:31:15 -0700 (PDT) From: "Fabio M. De Francesco" To: Sebastian Andrzej Siewior Cc: Ira Weiny , Andrew Morton , Catalin Marinas , "Matthew Wilcox (Oracle)" , Will Deacon , Peter Collingbourne , Vlastimil Babka , linux-kernel@vger.kernel.org, Jonathan Corbet , linux-doc@vger.kernel.org, outreachy@lists.linux.dev, Thomas Gleixner , Peter Zijlstra Subject: Re: [PATCH v2 4/4] Documentation/vm: Rework "Temporary Virtual Mappings" section Date: Tue, 26 Apr 2022 20:31:12 +0200 Message-ID: <3429395.iIbC2pHGDl@leap> In-Reply-To: References: <20220425162400.11334-1-fmdefrancesco@gmail.com> <3610796.MHq7AAxBmi@leap> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On marted=C3=AC 26 aprile 2022 13:47:34 CEST Sebastian Andrzej Siewior wrot= e: >=20 > Hmm. It is thread-local in the end. There are slots 0 =E2=80=A6 KM_MAX_ID= X for > the mappings. Slot 0 for task A can be different from slot 0 for task B > while both run on CPU0. So the same address, that is returned from > kmap_local(), will point to a different page for both tasks. Both tasks > can't be migrated to another CPU while the mapping is active. > "CPU local" sounds like something that is same to everyone on the same > CPU which is what this_cpu_read() for instance does. >=20 OK, I agree with you :)=20 I just got three notices from Greg K-H stating that he has applied three of= =20 my driver / Android patches. The patches are some conversions from kmap()=20 and / or kmap_atomic() to kmap_local_page() (or wrappers around it): https://lore.kernel.org/lkml/20220425175754.8180-4-fmdefrancesco@gmail.com/ https://lore.kernel.org/lkml/20220425175754.8180-3-fmdefrancesco@gmail.com/ https://lore.kernel.org/lkml/20220425175754.8180-2-fmdefrancesco@gmail.com/ I had forgotten that I wrote the following sentence in all three commit=20 messages: "[] With kmap_local_page(), the mapping is per thread, CPU local= =20 and not globally visible. []" Therefore, I'll add "thread-local" or "per thread". I probably like your=20 wording more than mine: "thread-local" is more suitable. =46or consistency (again) I like the other change you proposed, which is to= =20 add "deprecated!" also in kunmap_atomic(), exactly as it is already in=20 kmap_atomic() kernel-docs. However, I will wait one more day before sending v3, in case there are=20 other people who want to suggest further changes. If I remember correctly, I'm overlooking nothing else. Do I overlook=20 something? Thanks for your help, =46abio