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 B8E74C5478C for ; Fri, 23 Feb 2024 11:06:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4B1596B0075; Fri, 23 Feb 2024 06:06:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 461CC6B0078; Fri, 23 Feb 2024 06:06:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 329736B007B; Fri, 23 Feb 2024 06:06:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 1EECD6B0075 for ; Fri, 23 Feb 2024 06:06:26 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id C2B0C1410AC for ; Fri, 23 Feb 2024 11:06:25 +0000 (UTC) X-FDA: 81822789930.10.D7DDE47 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by imf03.hostedemail.com (Postfix) with ESMTP id AB35620016 for ; Fri, 23 Feb 2024 11:06:23 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=iJlt+tb7; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf03.hostedemail.com: domain of urezki@gmail.com designates 209.85.167.53 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=1708686383; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=jI1VvqgC35LAf15S3x3Yl5nucZ+rRIUoziAzKnZ3XY8=; b=ehokYNCNxW1lHzLK+md3Ae0ZP5z+noE9wj4xucxt9LSfJyUgsEkWSOa3GWgv/xbHMsKxbM GagiHFTDy7cQ2k/1EnH8PTrxEaUKm401KISVipi7i8vLpgZBpy4E3i3qN/puwedkKKUvjP MJgFWCOvW2ICB1FB4n42/hbgYnOq0vk= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=iJlt+tb7; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf03.hostedemail.com: domain of urezki@gmail.com designates 209.85.167.53 as permitted sender) smtp.mailfrom=urezki@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708686383; a=rsa-sha256; cv=none; b=XN3m6cL8G9zDaSU/plqtI7ftp7P0Zq9rxua4UKzgkYNXvZ7B5CDNnK5O9XXqpyk21q15z1 DFiHQ4kOAWA7/OReC8sEktYhhlXeg7XU2gaX89C0kYXuh43hotW/Bzg5dDCh+xf0a081C7 4l/HCzcZUnXxNME0Stt7GHMwI/oZohc= Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-512be9194b7so217881e87.1 for ; Fri, 23 Feb 2024 03:06:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708686382; x=1709291182; darn=kvack.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:date:from:from:to :cc:subject:date:message-id:reply-to; bh=jI1VvqgC35LAf15S3x3Yl5nucZ+rRIUoziAzKnZ3XY8=; b=iJlt+tb7jvXl89jFknVqICc3WrjynzTTXMWaZl5EC1lQjTj5QKlxt/Qd7RFSTrH9gF 3dLv6W1OVR71i10kQeqSlSD5JWONteNPbxwAeXxUH8iYtJj5v2mHnnPgZYr90l7D4GYD vUBjeLZ7o8VRUJSR/dUfo+xz0N9dMoTpYNrvUNWkHtCq9Bf8xxurXJugDKdSJhY89bCy VNz/YtKeQb4txHpH5eeF0gFhs+c7teQjxpVqpP03kB4GTexLCgZ2e0YLnBf6ChZWSZtP PtFO2VlzU+ulOK/diRxgZntIfl5B13tliJhY6XdXK3jMMkWvlt7fXBVjeNiCBSDMlu9s TOtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708686382; x=1709291182; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jI1VvqgC35LAf15S3x3Yl5nucZ+rRIUoziAzKnZ3XY8=; b=nfkWOYpo1Rm0ZguuNejWGyDWkUR5F9f/D7rM/ghyaMyj525YiPY7E0WWB4nlDMJOpo CDQWcXVkvZmPDXcLOrJjz0BIBRillI2WVTrOCFZQqUndh357QZPWS5iM6C2sFoLlIyvW 0BJiE0nuslSvkjxQ/yg9jTkkN1TMDpXh/G9FUyutRSBP28jSuo2xXVrpFinM1shUkbPh xaCCgx0+tzYPdmwZogJoa2QSq0nZxrsyyOwqCYCrLOLC0LaroZmgHQMQUddefc15ujcj yJ6RkCv/5gcPHFhubDN5VOinTxb2jb44fwRuZ38iMR3/IsdmMnkRu1U1OYSKjx3V7tss zSAQ== X-Forwarded-Encrypted: i=1; AJvYcCV/a4hXJt+U++mg6FQb4vKxkOl2uqxeZW5T57GNSdL7YkwYzLK+XR3gojbj7jLl+eTaODv972vU8Zg34giucfq9xnY= X-Gm-Message-State: AOJu0YxZFbrAPhVdwspszmObwb12A9ReFxj0TBigP3Oerqqp+n/f+AHU /NcTXhPPdxDtXhHl+ITlN4ScROMLV7Psv6/lVo9Ha5x0qIUo+vgS X-Google-Smtp-Source: AGHT+IEMAkg4Bat8ffHRPoKV22DBGZujIXXjCBbz4rfjX1ukK3lmgzCg1l6NUcCe/BJGgwqYJKUdog== X-Received: by 2002:a05:6512:69:b0:512:9af5:d083 with SMTP id i9-20020a056512006900b005129af5d083mr1091322lfo.60.1708686381379; Fri, 23 Feb 2024 03:06:21 -0800 (PST) Received: from pc636 (host-90-233-206-150.mobileonline.telia.com. [90.233.206.150]) by smtp.gmail.com with ESMTPSA id b22-20020ac247f6000000b005118e37462asm2390083lfp.89.2024.02.23.03.06.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 03:06:20 -0800 (PST) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Fri, 23 Feb 2024 12:06:18 +0100 To: Baoquan He Cc: Uladzislau Rezki , Pedro Falcato , Matthew Wilcox , Mel Gorman , kirill.shutemov@linux.intel.com, Vishal Moola , Andrew Morton , LKML , Lorenzo Stoakes , Christoph Hellwig , "Liam R . Howlett" , Dave Chinner , "Paul E . McKenney" , Joel Fernandes , Oleksiy Avramchenko , linux-mm@kvack.org Subject: Re: [PATCH v3 00/11] Mitigate a vmap lock contention v3 Message-ID: References: <20240102184633.748113-1-urezki@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspam-User: X-Stat-Signature: zg6yk1gmra11ue6ubz6u64u7u86wssfx X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: AB35620016 X-HE-Tag: 1708686383-339224 X-HE-Meta: U2FsdGVkX18dgVroxsXSkxdQ4JbyXLkajlEEkfOd5KO9/gGbP2fMSga1MzVYVlsOd4O2g4F6AACdjZhJzZHQbTn2J0DX6EA2Xl2TQUEa9EWjg0eX+SH7ZQ46V/9pHWbTSzVc8rgZB2Ts9OmFooSMIW66M63+AgAoNSpa1mtT06OArClmJgu+aOBgM4XDOFLZod69F8V3u5wwvKieCsiZ6pMo8wTztQjYvI/aeK4NmYn4VRhiPjGyKefyIR3aVPclcr4ysPqJByjq89vfMYnxSjAFi5pxToWkOy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s53H8O6lc/vq3ofx0/qHsqDLlRmZKMOjRE3PZLq1siHIwmAF0p4Nlpa6r+LEIGeApKvNF1CBetu9AxR+RwRcv7JzF6XpxIKFGAfD45Q4Vf34Rm8L4LmN3OEpfBHJiRtrSxWXdGOclaZwoTKl+H6Mti4vxxqxrjZYBgCaCtNeWPPp9xg= 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: > On 02/23/24 at 10:34am, Uladzislau Rezki wrote: > > On Thu, Feb 22, 2024 at 11:15:59PM +0000, Pedro Falcato wrote: > > > Hi, > > > > > > On Thu, Feb 22, 2024 at 8:35 AM Uladzislau Rezki wrote: > > > > > > > > Hello, Folk! > > > > > > > >[...] > > > > pagetable_alloc - gets increased as soon as a higher pressure is applied by > > > > increasing number of workers. Running same number of jobs on a next run > > > > does not increase it and stays on same level as on previous. > > > > > > > > /** > > > > * pagetable_alloc - Allocate pagetables > > > > * @gfp: GFP flags > > > > * @order: desired pagetable order > > > > * > > > > * pagetable_alloc allocates memory for page tables as well as a page table > > > > * descriptor to describe that memory. > > > > * > > > > * Return: The ptdesc describing the allocated page tables. > > > > */ > > > > static inline struct ptdesc *pagetable_alloc(gfp_t gfp, unsigned int order) > > > > { > > > > struct page *page = alloc_pages(gfp | __GFP_COMP, order); > > > > > > > > return page_ptdesc(page); > > > > } > > > > > > > > Could you please comment on it? Or do you have any thought? Is it expected? > > > > Is a page-table ever shrink? > > > > > > It's my understanding that the vunmap_range helpers don't actively > > > free page tables, they just clear PTEs. munmap does free them in > > > mmap.c:free_pgtables, maybe something could be worked up for vmalloc > > > too. > > > > > Right. I see that for a user space, pgtables are removed. There was a > > work on it. > > > > > > > > I would not be surprised if the memory increase you're seeing is more > > > or less correlated to the maximum vmalloc footprint throughout the > > > whole test. > > > > > Yes, the vmalloc footprint follows the memory usage. Some uses cases > > map lot of memory. > > The 'nr_threads=256' testing may be too radical. I took the test on > a bare metal machine as below, it's still running and hang there after > 30 minutes. I did this after system boot. I am looking for other > machines with more processors. > > [root@dell-r640-068 ~]# nproc > 64 > [root@dell-r640-068 ~]# free -h > total used free shared buff/cache available > Mem: 187Gi 18Gi 169Gi 12Mi 262Mi 168Gi > Swap: 4.0Gi 0B 4.0Gi > [root@dell-r640-068 ~]# > > [root@dell-r640-068 linux]# tools/testing/selftests/mm/test_vmalloc.sh run_test_mask=127 nr_threads=256 > Run the test with following parameters: run_test_mask=127 nr_threads=256 > Agree, nr_threads=256 is a way radical :) Mine took 50 minutes to complete. So wait more :) -- Uladzislau Rezki