Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp791730iob; Thu, 28 Apr 2022 11:16:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyG8VRQaDyaqDUHVomATWcOVrBn0jH7xdUbEBuIl6lYDRNKYGuCuLVEFM6HdpbUol/HPFlF X-Received: by 2002:a17:902:ccc9:b0:15b:c265:b7a0 with SMTP id z9-20020a170902ccc900b0015bc265b7a0mr34024047ple.107.1651169815225; Thu, 28 Apr 2022 11:16:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651169815; cv=none; d=google.com; s=arc-20160816; b=QsIVCZVPt629YMJn7F6zZ6qyv7X/7zgv+44OL3JR5+QTNtriCJpxbMzY3JlhdydtKR cSVCSPj0yPxd7XJLIghpWOt+VUIbAO2QCOxeCMeU7QwsmjGaWntmtH/Q+iJvAYG6eumZ t9D6+xZh9j/SamblAElkNmaBvYSjGtP56XMBnTAPbiosn+m49J3S6xYlFdYnrS3R0onM AKYhLEuO5E6mTpH2Zh3j0B7aMtbHFmAdSpBW0fbPF0PwEALOO9JpeXZDu8qiKZk50wC6 6D64YywCHPxHRFgkgSyJPuNoVOSbeDsYITk7OzTvXyBLP0V88opkZ7y04bSQKwiwP1xY /BrA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=cnxllsTcAyZYtkavIh31owKoz9rJdYEtxB5QbrLOk3k=; b=O/l7YhL5VgjvwoOWnxlnArexR5geqSlWXd+Fo/Oz1XNufaf9RSo7cop6YeJG1lM9jE e1sOAaffqr2LPDLs6useKVYrEwcCDeKjFtX2u2H/ZLkZ05adyPyrvryFypi7CziwulYy k7qiMglfY1iAGINEI5dmiB8f+hvXuzbs4luS46XgV8xKfs0gnmt2ioF9SReOJxoaF2yJ j/8oGZ8xZdvDgQpQwdzXD4jFFaFd8nc/Q99ke+zdrRvSDWBQcyfh2etRSbZkLIl8GGEk 4cLdJw1csnG+5ysVOKMdRJ0dOchg5YJaAAh8tMS63AD+6rdS1uSX5hvak5vgcJUSF7/C PWzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=UGJNInDB; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020a170902c94900b00155c9c5be01si5379815pla.570.2022.04.28.11.16.37; Thu, 28 Apr 2022 11:16:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=UGJNInDB; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345397AbiD1LI6 (ORCPT + 99 others); Thu, 28 Apr 2022 07:08:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343934AbiD1LIm (ORCPT ); Thu, 28 Apr 2022 07:08:42 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D63F42F4; Thu, 28 Apr 2022 04:05:24 -0700 (PDT) Date: Thu, 28 Apr 2022 13:05:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1651143922; 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: in-reply-to:in-reply-to:references:references; bh=cnxllsTcAyZYtkavIh31owKoz9rJdYEtxB5QbrLOk3k=; b=UGJNInDBPSxA5iy6App+FFqkZE4flLJQY8+rk28YwbJ9klfs7ZSzorXAs9eSBFVfB/7Zwg AXzmj8T2D3pvGVYrTRB65GPr3Cays9X+igoYKxJpOQ6C7JU6szReOzcaAoxl+EXFX2wCB+ PvrAqZ07eM6cY6FyH8kXF8uTzw8KWUN15fNXQtPmwNHlGZgvuwf3RBtRQKbFHYAkfX6EsT DksWdXCyDYDbfpnV1i5/HkLLLYTuhFabqGHvg3oaXU49FfzTVy+QS6kBwrQ1S88Uy3GAZW GH/UTAzrXlO8x1ZmLK4wl91t5KkjqrN5DfSiWZe/GlzwNHTnbDmPa0acLALlrg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1651143922; 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: in-reply-to:in-reply-to:references:references; bh=cnxllsTcAyZYtkavIh31owKoz9rJdYEtxB5QbrLOk3k=; b=seOCzzM5JH2712g7j/mcC/gzYbbNjXx8Or9WsjyDPI1JoCtzFz/hB2js/Mlnsj0CFf+s2N XKv8UdRY3I6eo0BQ== From: Sebastian Andrzej Siewior To: "Fabio M. De Francesco" Cc: Ira Weiny , Andrew Morton , Catalin Marinas , "Matthew Wilcox (Oracle)" , Will Deacon , Peter Collingbourne , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, outreachy@lists.linux.dev, Mike Rapoport Subject: Re: [PATCH v3 1/4] mm/highmem: Fix kernel-doc warnings in highmem*.h Message-ID: References: <20220427183821.1979-1-fmdefrancesco@gmail.com> <20220427183821.1979-2-fmdefrancesco@gmail.com> <2598013.X9hSmTKtgW@leap> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2598013.X9hSmTKtgW@leap> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham 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 2022-04-28 12:54:14 [+0200], Fabio M. De Francesco wrote: > No, it's not sufficient because Matthew Wilcox said that something like "It > is the counterpart of kmap_atomic() for unmapping" (or anything similar) is > _not_ what he wants to see. > > Furthermore, a large part of this text has been written by him (I'm talking > of a couple of weeks ago, when this patch was not part of this series - it > was on its own until Ira Weiny asked me to gather 4 patches in one only > series). Sure. > > This indicates the "migration" is disabled for > > !PREEMPT_RT which is not the case. > > I read again how kmap_atomic() is defined. There are lots of 'if' > statements. Only if the code gets to __kmap_local_pfn_prot(), users can be > assured that it unconditionally calls both migrate_disable() and > preempt_disable(). Right, that part. Then keep it. > > So maybe something like > > > > * Unmaps an address previously mapped by kmap_atomic() and re-enables > > * pagefaults, CPU migration (CONFIG_PREEMPT_RT) or preemption > > * (!CONFIG_PREEMPT_RT). Mappings should be unmapped in the reverse > > > > will make it clear. > > I'm starting to think that this level of detail is too much for users who > just need to understand how to use this function as well as > kmap_local_page(). > > I prefer something like the following: > > + * Unmaps an address previously mapped by kmap_atomic() and re-enables > + * pagefaults and possibly also CPU migration and/or preemption. However, > + * users should not count on disable of migration and/or preemption as a > + * side effect of calling kmap_atomic(). Mappings must be unmapped in the > + * reverse [...] > > I'd also like to write the same paragraph for kmap_local_page(). > > What do you think of being less detailed and instead using the text I wrote > above? Sounds perfect. > Thanks, > > Fabio Sebastian