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 7C157EE14D0 for ; Thu, 7 Sep 2023 09:58:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AAE6C44017F; Thu, 7 Sep 2023 05:58:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A61878E000F; Thu, 7 Sep 2023 05:58:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8FF0244017F; Thu, 7 Sep 2023 05:58:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 7DA158E000F for ; Thu, 7 Sep 2023 05:58:22 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 2B7EB1401C7 for ; Thu, 7 Sep 2023 09:58:22 +0000 (UTC) X-FDA: 81209351244.14.B0B61F0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf21.hostedemail.com (Postfix) with ESMTP id 606DC1C0005 for ; Thu, 7 Sep 2023 09:58:20 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="YAeCfO0/"; spf=pass (imf21.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694080700; 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=+YZnY8Y16y63bpnKa1LB+Dq6TqgHlqb2M3cQd5Vbeeg=; b=bkH6VC5ktp8pa8iNqZbR0z6qsufqcyQWDtrQ/e9KvvmN6zAPBBJiMn8LhvhABRFve2Alko qGOJcuG2KPn6Nj+dhtxbXAAbRp308kAudWtsd+k2Bana4PM8dTH1DkqTNxRh9oaHaqANIb HovaXclrFZkfnbQ3FK8eyxCz4MDhPa4= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="YAeCfO0/"; spf=pass (imf21.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694080700; a=rsa-sha256; cv=none; b=b2FkcSDzHvvtjAZ0jir/grVVLgtTJB7YM6NiClSsANs8QvZ6VMyr6wlxPsx2bcsv817CKm +IU0AjSav0qWyr7n9nHX10HHbQ/VZJgyAbPVtCtAAnjlb4Qt94s89ChVxmqA+ookfSh4Vj 8LNr4QCQ732cSQPKdLq70rGYYL7CosQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694080699; 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=+YZnY8Y16y63bpnKa1LB+Dq6TqgHlqb2M3cQd5Vbeeg=; b=YAeCfO0/QZXGC3Sqd2J7S5Q1VHxhI3gI36LCXZ7RDxC6xz1g+UMRUBUwopHDo3Wu9dAeO7 wU39LuctFW39uDfNxxZJvvudjNvbeFZfgKfiZvI8iIPTBieNeKLUaDBI2YLUDZ1DJdv6LJ a5YGih8dupPRoJ7M/zf165pp6FqG10o= 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-279-bRJDmM7BNXioUhRM5aC-Og-1; Thu, 07 Sep 2023 05:58:16 -0400 X-MC-Unique: bRJDmM7BNXioUhRM5aC-Og-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 79102801FA9; Thu, 7 Sep 2023 09:58:15 +0000 (UTC) Received: from localhost (unknown [10.72.112.68]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 399E2493112; Thu, 7 Sep 2023 09:58:13 +0000 (UTC) Date: Thu, 7 Sep 2023 17:58:09 +0800 From: Baoquan He To: Uladzislau Rezki , k-hagio-ab@nec.com Cc: lijiang@redhat.com, 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: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Rspamd-Queue-Id: 606DC1C0005 X-Rspam-User: X-Stat-Signature: ien8ny44xd8b1eq64iory468h8dmghme X-Rspamd-Server: rspam01 X-HE-Tag: 1694080700-497727 X-HE-Meta: U2FsdGVkX181cP3zQGA0s8wItRj2c0KvWmxm/lfmRMTIVLtxH4ZER7w4a1w68ORTB6lKIhTdgJ4GPRa0NPIC/V1jx+hh75vBxFCqVmCOtEnrko9POrs+t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jDwotCbwPLxqRpG+a/aytWHkpcgyIlM2pWZe+eqpzk1ozJv4g== 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: On 09/07/23 at 11:39am, Uladzislau Rezki wrote: > On Thu, Sep 07, 2023 at 10:17:39AM +0800, Baoquan He wrote: > > 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. > > > It is left part and i hope i fix it in v3. The problem here is > we can not give an opportunity to access to vmap internals from > outside. This is just not correct, i.e. you are not allowed to > access the list directly. Right. Thanks for the fix in v3, that is a relief of makedumpfile and crash. Hi Kazu, Meanwhile, I am thinking if we should evaluate the necessity of vmap_area_list in makedumpfile and Crash. In makedumpfile, we just use vmap_area_list to deduce VMALLOC_START. Wondering if we can export VMALLOC_START directly. Surely, the lowest va->va_start in vmap_area_list is a tighter low boundary of vmalloc area and can reduce unnecessary scanning below the lowest va. Not sure if this is the reason people decided to export vmap_area_list. Thanks Baoquan