From patchwork Fri Mar 31 07:37:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13195356 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 4552AC6FD18 for ; Fri, 31 Mar 2023 07:37:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3E4F46B0071; Fri, 31 Mar 2023 03:37:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 393AD6B0072; Fri, 31 Mar 2023 03:37:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2A9C06B0074; Fri, 31 Mar 2023 03:37:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 1A0686B0071 for ; Fri, 31 Mar 2023 03:37:33 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id D1FF6C024D for ; Fri, 31 Mar 2023 07:37:32 +0000 (UTC) X-FDA: 80628388344.02.6A64715 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) by imf30.hostedemail.com (Postfix) with ESMTP id 1BFA08000A for ; Fri, 31 Mar 2023 07:37:30 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=C0iwRqJ3; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf30.hostedemail.com: domain of urezki@gmail.com designates 209.85.208.51 as permitted sender) smtp.mailfrom=urezki@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1680248251; 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=d+GCokEixfnjb0KDc+ixTXWvlGW6wj+Kz4azKab2G+4=; b=KlpelVY8u01yy6ssyfz2IfzxYlAO1vdD8/y/KDfkA9OakoXik0EErwqGEKP8cV2kYnIH2r OyAGz7KgiF+GA/R/Q7W3c4VUuC0SSjG71YXoEYUbm+GwAebIEn2bSK2oOTlmOHUJaChx3v KZep1mHVSuFA+af+sB1TQB0fUYa4YjE= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=C0iwRqJ3; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf30.hostedemail.com: domain of urezki@gmail.com designates 209.85.208.51 as permitted sender) smtp.mailfrom=urezki@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1680248251; a=rsa-sha256; cv=none; b=uIazJxIWVgTOtyOxzJx87+TSg1PAC5rHrMpcPQMrTTZ8bOUN8diHvm/ThmS68Eb3zW+yII KKDgnET4kUyblEZuNFvxDUD4il5QF8rh05RwP00RcJxqKa29VmeMrSyPGYMfNfq4gbEaO0 iQ6qV3Q7xIIQgY1HjNisRXM2dfG6JwQ= Received: by mail-ed1-f51.google.com with SMTP id eh3so86114198edb.11 for ; Fri, 31 Mar 2023 00:37:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680248249; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=d+GCokEixfnjb0KDc+ixTXWvlGW6wj+Kz4azKab2G+4=; b=C0iwRqJ3uiq1194Wqj49Bb5cojtwdi0U0eOUlkL7/QXlm3wLdTPoju+5OIh5CBjiwt 5/kgw6xt+Tdp42qLxcM2JWJnj16PqSvvl71uHh8VxOLHsaIlQOUV25bLr+8Nl7646A0q SLYn7wsUcQNuDeu+85b5enQrqSQyHiaN5nVHlZgkVA6H1Nnkx9IzLiY7uFRy8atiIA8F Y1vMvGNV5HN9cVcCMvAtqMATJi2DfgLFAbJWAkg/lV1H9nBIy/TeJtioSTGu6hTrjPtg qvBbPEemJIROQGDgvzTPEsuFaAmVFDUAet9bXAfZlpB/US+eAo9oSRKTIjJm4kZdxNIx FFqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680248249; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=d+GCokEixfnjb0KDc+ixTXWvlGW6wj+Kz4azKab2G+4=; b=PJXG7pXZiOmYWrEJSA9pJPIPGpXI8aZHBQ9kV1JBgXQal85RQlkva2YTx5eBrzisuu KpGq62cFPj/SFmZ0BEqHGU4xJSKi6R5by2ytRHIzZCBc1a43eUZXfSBxGfE2uJc99iHW 4q1bSrY7KOn/b1QBKbaMOOehP2UqcuMjSSNdv7kuF+yE8nxcTfV1ND8fTG7ne/qfehwG ZgEGxRclpi9z6b24qelI1wVhqYv+Ft+S5MLAgXi81u+NWxSO9LHsvrsTse8LBgwgmnNV aHVMYyOhUhEXjDBAk9FKNbFnn0BSpvuvsmw3pI1vkCBo7u8xKqcN+HiVPuxBv9qDW1gO 9InQ== X-Gm-Message-State: AAQBX9dwbgBdxVE7YsaYCiDSsQY9Sr7chxxjNNOu2D2ZLAqCaEZmXqNE 5frKlVYOwWqkNJhVDDMyPVc= X-Google-Smtp-Source: AKy350ZOJQSX1gjZAMOgwMXd3tTvZegEvz+G6fSAJ5p5n5wcA8j3qyjV01Tqdm+IQWQG9V0NiZtVyw== X-Received: by 2002:a17:907:c088:b0:931:2f49:c040 with SMTP id st8-20020a170907c08800b009312f49c040mr31542588ejc.51.1680248249513; Fri, 31 Mar 2023 00:37:29 -0700 (PDT) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id o12-20020a170906600c00b0092bea699124sm682722ejj.106.2023.03.31.00.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 00:37:29 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: Andrew Morton Cc: linux-mm@kvack.org, LKML , Baoquan He , Lorenzo Stoakes , Christoph Hellwig , Matthew Wilcox , Dave Chinner , Uladzislau Rezki , Oleksiy Avramchenko Subject: [PATCH 1/1] mm: vmalloc: Rename addr_to_vb_xarray() function Date: Fri, 31 Mar 2023 09:37:27 +0200 Message-Id: <20230331073727.6968-1-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Rspamd-Queue-Id: 1BFA08000A X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: kdx676t7tcqoj51qzqy7si8uqiqcihry X-HE-Tag: 1680248250-219344 X-HE-Meta: U2FsdGVkX1970QaX1C1nDNfgFk0gyc4q1pxI/KNcDIKFUhhBgNpq6znsbW+U4h+Z0H3UUzvINmEDkx+UJdo0w8cObI6dNlBDPr1A488kD4lu1nexALTPBcxtgcglbj17Nh7UCNX4x1Yfuk7Hd96XVulprZK6psuoBF6nE9yCnPrQVmM2TsaBrWt1WYuK5It/u1bPlSlWSDWUVNqwl5d/lzpILaA/xpOgJ6Em6ecU2WP97MyVGhBgySrpw4pOi0+5ESp9ATm7jDHETtNCHKTqtjMz8LLGgaC6Xb8CCBFxza3fWon8LOEtgbpZyqmLRB6JOzKg5dShNKoEQ36+xfv77dV12gSbLa+ucZIcoCMjGil/YYHKHxBaQj7qrdWhz1rmr0dt1z3UfiLMQ8ejcSpwi3f+9gQaKYW1O8ympAXyiojVvwrKdfiC7oM1nKdFeLzbwzzyjetIymg4wkjJ0TnSgXmeo4yF4GN0UIWqzMj2MmzyOpQEtarBWb3bqjYTy23V/pfNBErDI2MYHfJ7pd9h1lhTJg2aXPmz8XF4TDJ4TnQPVXBkZ5mUmeFRRmEi+YSdGbOT20a5O/9QpYic8F1I3VANwHhuhImDkBkvDKwpXiiZ1Hr9UQK5lGjQUZ7NvO0G2cqkXSWOz3NxEydMGXMbjperKR6ocJxfhoBrgskh0S4S6qzHZGfRAYoc7Jro8cBOLVjK3hgJ71sEaYIaaR6tHhCfvRjwcdUo/wqgmCf710eoaI0DoBH7kau8g7CImP+bNtGlUe6vk859gJKLbAv7cUDdZh4YXQoKkWNwkO7vsr1HYDhVPRRaXkNM6n6IH6jdERsnzwu/e5b3RJhFhdMnbKLMVpDmXZ752jdPe6wxpZ9vs3zSK97+v3cYXMJMi0gcjf+AuqR54aJB0QeoROoOMwqAqSiq874QmkSY959jQmNXwmk6Xj6MbQkNbrjzZspfZNAmaMBsDFCdyCFaUiI IjwwB4/h MlhcRNVgpcTEimf2XHRiCQ9bA6WftCU8OyJLmROe4eQdGoNcMiNRcFP0WmmsH8CXzEmbVkMQt02VPoSX8IJT8CqvCyG8H9ZiL2iQaoR5P0lBQ1bP6IXOJSM6slQh1ofinjUh43InOlw20cKKDAWJwhcR2fZQn5+4d3U39mmnnkxfn72KTeWkKiG/Itj6GykfbVHkkL0Y2mpgJzk2saT62q0N40fRWMYW0XcSovt4NJCcFsJKa4Rjc5OcgYR3YYzviG8mnHy63JLOIN6gCnsOQUfUQ3b3obBoW2XuJPx+j5ijgFnNG9XIGWmHzod5GEljST+zRwB0uY2iMclRfw9WGKtbediZNNaUgvNcHZ/zk1TXjNnxB3O3kexhoSX6YXvZ9lcDAjDxCsZt9yU2X1ThCtYjBKtyAlPAXfud1ymLsM7uXEhXcDcK4yVjTSP/VBwcCERwR6lODxFl2dHusf650JQInL2FqITef11xQrTlGycq61FhnZYmHBoyGcVfbZ+37zWNMmMFqpC80PV1LEmL4w9IuQw== 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: Short the name of the addr_to_vb_xarray() function to the addr_to_vb_xa(). This aligns with other internal function abbreviations. Suggested-by: Baoquan He Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Lorenzo Stoakes Reviewed-by: Baoquan He --- mm/vmalloc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 671d6d5d5b78..b8b646f8a00d 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1945,7 +1945,7 @@ static DEFINE_PER_CPU(struct vmap_block_queue, vmap_block_queue); * used as a hash table. When used as a hash a 'cpu' passed to * per_cpu() is not actually a CPU but rather a hash index. * - * A hash function is addr_to_vb_xarray() which hashes any address + * A hash function is addr_to_vb_xa() which hashes any address * to a specific index(in a hash) it belongs to. This then uses a * per_cpu() macro to access an array with generated index. * @@ -1971,7 +1971,7 @@ static DEFINE_PER_CPU(struct vmap_block_queue, vmap_block_queue); * however xarray spinlocks protect against any contention that remains. */ static struct xarray * -addr_to_vb_xarray(unsigned long addr) +addr_to_vb_xa(unsigned long addr) { int index = (addr / VMAP_BLOCK_SIZE) % num_possible_cpus(); @@ -2048,7 +2048,7 @@ static void *new_vmap_block(unsigned int order, gfp_t gfp_mask) bitmap_set(vb->used_map, 0, (1UL << order)); INIT_LIST_HEAD(&vb->free_list); - xa = addr_to_vb_xarray(va->va_start); + xa = addr_to_vb_xa(va->va_start); vb_idx = addr_to_vb_idx(va->va_start); err = xa_insert(xa, vb_idx, vb, gfp_mask); if (err) { @@ -2070,7 +2070,7 @@ static void free_vmap_block(struct vmap_block *vb) struct vmap_block *tmp; struct xarray *xa; - xa = addr_to_vb_xarray(vb->va->va_start); + xa = addr_to_vb_xa(vb->va->va_start); tmp = xa_erase(xa, addr_to_vb_idx(vb->va->va_start)); BUG_ON(tmp != vb); @@ -2193,7 +2193,7 @@ static void vb_free(unsigned long addr, unsigned long size) order = get_order(size); offset = (addr & (VMAP_BLOCK_SIZE - 1)) >> PAGE_SHIFT; - xa = addr_to_vb_xarray(addr); + xa = addr_to_vb_xa(addr); vb = xa_load(xa, addr_to_vb_idx(addr)); spin_lock(&vb->lock); @@ -3556,7 +3556,7 @@ static void vmap_ram_vread(char *buf, char *addr, int count, unsigned long flags * Area is split into regions and tracked with vmap_block, read out * each region and zero fill the hole between regions. */ - xa = addr_to_vb_xarray((unsigned long) addr); + xa = addr_to_vb_xa((unsigned long) addr); vb = xa_load(xa, addr_to_vb_idx((unsigned long)addr)); if (!vb) goto finished;