From patchwork Tue Apr 2 12:55:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13613961 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C901CD1284 for ; Tue, 2 Apr 2024 12:56:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9CBC86B009A; Tue, 2 Apr 2024 08:56:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 92FFE6B0099; Tue, 2 Apr 2024 08:56:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7358A6B009A; Tue, 2 Apr 2024 08:56:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 41C3E6B0095 for ; Tue, 2 Apr 2024 08:56:01 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id CE704120542 for ; Tue, 2 Apr 2024 12:56:00 +0000 (UTC) X-FDA: 81964589280.21.45A1FD6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf29.hostedemail.com (Postfix) with ESMTP id 39A2C120017 for ; Tue, 2 Apr 2024 12:55:59 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=gTVKawdT; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf29.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712062559; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=mcxjCOywRtLdiEcHC2fGLUZpoWNnKmQE4MNGQaUK4kg=; b=P6J83SDRTq2EN2Tj8JtcebB72NFuCCU79enRYgIRUY0goQomZj89ocVXQJk0j97X5DiJU1 OFo6t/F/ZSh/QFm1FR3ylTM7zlnao33Ky+s3F/0LSvMdDcOgE5X72hT89HrlUKbldwHvgO TTUFQhknZ6z+uw4fsBAeQJrTo4GuYvE= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=gTVKawdT; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf29.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712062559; a=rsa-sha256; cv=none; b=FVWow+/No9EgGG7IJ33oQmMam8/wvLZvmESnWnIXO19SOQobEwF5uSUxMz9Hk9GicMNjN8 5zE5TfQlTbFzbXtvsOKObRiPPWsIyi8F1lilwiRzZC50nU2pFAnU+be94rxTcgudgKqpju 5C0JgXU4vCCYsoZWCWxBXDPNnaRWy44= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712062558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=mcxjCOywRtLdiEcHC2fGLUZpoWNnKmQE4MNGQaUK4kg=; b=gTVKawdTIKoKPqp8+D7Fm35Uy0IW6DOzt4EYRHMYGsCYAdDVqVGdxkP0laiI9diHCeJozt tQ/d0jLdmKbSnD34u6tAVsV5JroaPkdwGRIOFYUt9iZaFSkkhJAPlq0vQueJW+WCYdxi94 PZYrQJrTSn/2/5z2IBa5c/EP2UFAmmg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-203-jrB5cRd5NSepbRcVx10PBw-1; Tue, 02 Apr 2024 08:55:43 -0400 X-MC-Unique: jrB5cRd5NSepbRcVx10PBw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 57030881F00; Tue, 2 Apr 2024 12:55:42 +0000 (UTC) Received: from t14s.redhat.com (unknown [10.39.194.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3917D3C21; Tue, 2 Apr 2024 12:55:37 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Andrew Morton , Mike Rapoport , Jason Gunthorpe , John Hubbard , Peter Xu , linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-riscv@lists.infradead.org, x86@kernel.org Subject: [PATCH v1 0/3] mm/gup: consistently call it GUP-fast Date: Tue, 2 Apr 2024 14:55:13 +0200 Message-ID: <20240402125516.223131-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Rspam-User: X-Stat-Signature: 5axpbtxsj7ezo667cu8xgryzkff8w7t8 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 39A2C120017 X-HE-Tag: 1712062559-553441 X-HE-Meta: U2FsdGVkX1+5QYOs6CHN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+MQgkWEzXSQZZulKzGK1KtwBRb3acdsaDWmsQlxDVPEwF7h6jBofrlhtWeJ9IkDslfYKF9+eRzjDMLU/Dod2PgMhbH4E6XLmGpQxfvykQQy6LIyklBJh6KthJArq2/hUtKuQgWTjf3WS2zE/8m5TpF2W+z2R/l+kaowpZHCHPDuOqT684FMXCOhFeMKMkV0EqDJBeCB5o/UyJ2FTcIxBvVbGIjLgWH/27ZT6jQQcB7pnWRwJSu5DK6N/iZSRN10rArhy5ffhwHhOmVDWP9YG3S7FRGvuqajyC1O+BJcHQ4V7EILtC8BXxtT0gK2/r4xptN5ADFRoL8fETaH0YqNdcLQOZeC6A15Tc2/5GsfX2hAp0IZ26e2Rnzii//nO5rbDjAVPEb95vNMjyjtMxVPUZ97fXMaP/Az5mBs3fRr+g5V8M+1j+GrNUat/AS9IidRjWqmbiww== 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: List-Subscribe: List-Unsubscribe: Some cleanups around function names, comments and the config option of "GUP-fast" -- GUP without "lock" safety belts on. With this cleanup it's easy to judge which functions are GUP-fast specific. We now consistently call it "GUP-fast", avoiding mixing it with "fast GUP", "lockless", or simply "gup" (which I always considered confusing in the ode). So the magic now happens in functions that contain "gup_fast", whereby gup_fast() is the entry point into that magic. Comments consistently reference either "GUP-fast" or "gup_fast()". Based on mm-unstable from today. I won't CC arch maintainers, but only arch mailing lists, to reduce noise. Tested on x86_64, cross compiled on a bunch of archs. RFC -> v1: * Rebased on latest mm/mm-unstable * "mm/gup: consistently name GUP-fast functions" -> "internal_get_user_pages_fast()" -> "gup_fast_fallback()" -> "undo_dev_pagemap()" -> "gup_fast_undo_dev_pagemap()" -> Fixup a bunch more comments * "mm/treewide: rename CONFIG_HAVE_FAST_GUP to CONFIG_HAVE_GUP_FAST" -> Take care of RISCV Cc: Andrew Morton Cc: Mike Rapoport (IBM) Cc: Jason Gunthorpe Cc: John Hubbard Cc: Peter Xu Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: loongarch@lists.linux.dev Cc: linux-mips@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: linux-sh@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-perf-users@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-riscv@lists.infradead.org Cc: x86@kernel.org David Hildenbrand (3): mm/gup: consistently name GUP-fast functions mm/treewide: rename CONFIG_HAVE_FAST_GUP to CONFIG_HAVE_GUP_FAST mm: use "GUP-fast" instead "fast GUP" in remaining comments arch/arm/Kconfig | 2 +- arch/arm64/Kconfig | 2 +- arch/loongarch/Kconfig | 2 +- arch/mips/Kconfig | 2 +- arch/powerpc/Kconfig | 2 +- arch/riscv/Kconfig | 2 +- arch/s390/Kconfig | 2 +- arch/sh/Kconfig | 2 +- arch/x86/Kconfig | 2 +- include/linux/rmap.h | 8 +- kernel/events/core.c | 4 +- mm/Kconfig | 2 +- mm/filemap.c | 2 +- mm/gup.c | 215 +++++++++++++++++++++-------------------- mm/internal.h | 2 +- mm/khugepaged.c | 2 +- 16 files changed, 127 insertions(+), 126 deletions(-)