From mboxrd@z Thu Jan 1 00:00:00 1970 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 C6767EE14A9 for ; Thu, 7 Sep 2023 02:17:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BCB17280021; Wed, 6 Sep 2023 22:17:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B7ADF280022; Wed, 6 Sep 2023 22:17:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A44F5280021; Wed, 6 Sep 2023 22:17:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 781C6280027 for ; Wed, 6 Sep 2023 22:17:52 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 3207E80F1D for ; Thu, 7 Sep 2023 02:17:52 +0000 (UTC) X-FDA: 81208190784.06.3F5BF61 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf06.hostedemail.com (Postfix) with ESMTP id 5245B180012 for ; Thu, 7 Sep 2023 02:17:50 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=GoQYnun+; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf06.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694053070; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=eNUh+ilmidts82zkL3kEJ0JI8XOX1rnGdxOPQB5E6Bc=; b=aXJ9XOI/HJ+xS40LNdYzyQLBKaPDet2XPluQvdem6fT1RDI28qcu+2/ndmV/g62W2IqNSu +Mq2NXUxV5PopOqm6PjXCVCLnbQm7vGMAVjzKnycV5i9+Z9DPnMVsV6A4MPTmi4SePYt3D tbICGngwoQo/iSyYtFl1ICaz90TFPgE= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=GoQYnun+; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf06.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694053070; a=rsa-sha256; cv=none; b=bLCK4TD8ybLKIkEVmc7Ld6F5+ZW+7lPUniTkj9p8ZDAgVrj8yxk6QcIwtz+85c1/GwaZSN 5Ruacn1sWhPMk/T8IOKEaW6zJq7MzrjY2DKgQrfKnhy7UHUFWltwfXQn6VLlL7RBtzrSkw RazAUerrGN1qQQ75pER2vpipP1T6oro= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694053069; 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=eNUh+ilmidts82zkL3kEJ0JI8XOX1rnGdxOPQB5E6Bc=; b=GoQYnun+kvnK1QSjOV9O1FWPRlevKuy+XvlnUrGLkEP5XSyyPuBZ9NN9aBGSivZG/PLFHT D4NVsny1SvQfR36xzri/FUd5v4hlPSeK0gIgkUuFYytweJDr8VuKSMUXmJn926Hktk9O4H EJ7V0RWVruzR8mfpaYCypH+N0S2IC5I= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-623-7ehbO9zbOZO0TtB0S7UNvQ-1; Wed, 06 Sep 2023 22:17:44 -0400 X-MC-Unique: 7ehbO9zbOZO0TtB0S7UNvQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 33725101A529; Thu, 7 Sep 2023 02:17:43 +0000 (UTC) Received: from localhost (unknown [10.72.112.68]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 52EB9404119; Thu, 7 Sep 2023 02:17:42 +0000 (UTC) Date: Thu, 7 Sep 2023 10:17:39 +0800 From: Baoquan He To: "Uladzislau Rezki (Sony)" , k-hagio-ab@nec.com, lijiang@redhat.com Cc: linux-mm@kvack.org, Andrew Morton , LKML , Lorenzo Stoakes , Christoph Hellwig , Matthew Wilcox , "Liam R . Howlett" , Dave Chinner , "Paul E . McKenney" , Joel Fernandes , Oleksiy Avramchenko , kexec@lists.infradead.org Subject: Re: [PATCH v2 4/9] mm: vmalloc: Remove global vmap_area_root rb-tree Message-ID: References: <20230829081142.3619-1-urezki@gmail.com> <20230829081142.3619-5-urezki@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230829081142.3619-5-urezki@gmail.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Rspamd-Queue-Id: 5245B180012 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: tteucxc4kc7mfwj86gyb3mepwkcboztb X-HE-Tag: 1694053070-714772 X-HE-Meta: U2FsdGVkX1++MvKMwSZA03JYR2UZxykthImw9RmrPwBPHJ4rT4c/4NQ+HH8JqxwmvOvq5kYwzGRDJ9t37AdLVoanSiYBiz20UWGdQx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QU781pNOucar9QJE0pAYjyF4wJuzSK7JtiIntkjqsbjArCZTwRc/if5mar4Rw== 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: Add Kazu and Lianbo to CC, and kexec mailing list On 08/29/23 at 10:11am, Uladzislau Rezki (Sony) wrote: > Store allocated objects in a separate nodes. A va->va_start > address is converted into a correct node where it should > be placed and resided. An addr_to_node() function is used > to do a proper address conversion to determine a node that > contains a VA. > > Such approach balances VAs across nodes as a result an access > becomes scalable. Number of nodes in a system depends on number > of CPUs divided by two. The density factor in this case is 1/2. > > Please note: > > 1. As of now allocated VAs are bound to a node-0. It means the > patch does not give any difference comparing with a current > behavior; > > 2. The global vmap_area_lock, vmap_area_root are removed as there > is no need in it anymore. The vmap_area_list is still kept and > is _empty_. It is exported for a kexec only; I haven't taken a test, while accessing all nodes' busy tree to get va of the lowest address could severely impact kcore reading efficiency on system with many vmap nodes. People doing live debugging via /proc/kcore will get a little surprise. Empty vmap_area_list will break makedumpfile utility, Crash utility could be impactd too. I checked makedumpfile code, it relys on vmap_area_list to deduce the vmalloc_start value. > > 3. The vmallocinfo and vread() have to be reworked to be able to > handle multiple nodes.