Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1019059ybi; Tue, 16 Jul 2019 08:28:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzt/s6ubGKtQR5xnKC0NCJP7vIFuL2FWv3XjDSWAhdlGJYtZ4qpAoYFrPEq6YG7141bIOUn X-Received: by 2002:a63:2bd2:: with SMTP id r201mr34108745pgr.193.1563290881242; Tue, 16 Jul 2019 08:28:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563290881; cv=none; d=google.com; s=arc-20160816; b=Pgm/DgTiygXqBn6f/TQwyLj4CEXuRkEfi3B6ABDMyVapskgji3ckqt4UCT3FHNFcC/ hHo7yJizx1qvm5tAMzOeuL4grGBEQ3xjzgZUt6jvutRuq6v8hyP0D7nmkEcsPSl+t+iW Uxpj7QiKJffFxyXfDQGvjML0ObjIiZer6sEs/E8OsghPv+9MEOJNmZM23q8lyeolx1Sf z0Yf8eMn01g2J6sriKZmdVJP0riPuJ4U8KqhtQtJcm8uni8O9achmk6KtA2/Ifz4zHOK U8rCfyvk/IZ6frDtj42/dTS3InyDXySN3hetmyHyRBOQUvty3zYk8dC5tYFBtV2r4cJf LaGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=HxedKsOlRoMuH0YAi3w5n8XgUhrmrip/11U2C/L62+s=; b=tcpG1nxrfLVGt1B7IgoZsU9aod10/suYDF96vxghkX+gVRoU0HL90pWDX/pa8Jyos0 cvhRmShfwmvLy7I0vpp6/5Spxh/kOl0ITRRWDLtpzTzSx5TvvJe+YfphMDhV6kYu6YXl N76EQBt92TJKeTRySpe2+taiv/zl70ObQsYMqaWBXXyqF44tT/x2dS5ZMyMEba3wka9W iiGFvZfqhseshFM2hbJsZ0Qa+EbmqLcnh5x8ltukJ8Av0eq+Xqx9NO+vVzVX1B7CWi6z rxO7bqWbF9QsplPFbY/X58v1AV/P2aCXbtx0mUKLrgOt9tYroY4izwTkvsU+KZbvYCYv 1HqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZZcN5b+L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32si18965362pla.181.2019.07.16.08.27.44; Tue, 16 Jul 2019 08:28:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZZcN5b+L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387758AbfGPP1R (ORCPT + 99 others); Tue, 16 Jul 2019 11:27:17 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:39366 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728390AbfGPP1R (ORCPT ); Tue, 16 Jul 2019 11:27:17 -0400 Received: by mail-pf1-f195.google.com with SMTP id f17so5295917pfn.6 for ; Tue, 16 Jul 2019 08:27:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HxedKsOlRoMuH0YAi3w5n8XgUhrmrip/11U2C/L62+s=; b=ZZcN5b+L7iWZo3iArIcmAzXPEGsGU2NeexpNaf6SNsgDDLXVphrRU+sEQ/hrnLmpHJ 8xzFTZLinKyISv9p9ErZE3Rpojfjh4dJRIelGwba8icXvxJuBnCo/uVUVCOp0JOWEnw3 fpn/IitK8VLeIrMfR/WNCF4sRuf9xqZGibk1xdzmDjl6X6/Nzp/m9GYv5ocHES1YT9cM 8jX7ZPtCUIg4kAocab0gZTzzbVghHoApiZU6YzVtvvDUrnqV4CjJrnuf1Q6gBGHlKEp8 v2pI43Vtkp2slOxzSVSRCwd94hwjb22RBp8pJHGbvN5pHST/X8YUNxvpEIAlNjWh1hND a2wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HxedKsOlRoMuH0YAi3w5n8XgUhrmrip/11U2C/L62+s=; b=lKPsr/N6f0zLpwdGBmKNOuasKLWgcJXYCuPb3l45YYEiuUeSWvtYlOkGUQDgtdG1Mx x/NIUaPYDo9Cc8tfigmesDLzVHgUtuu0VGH+SH3xBrKS26tR/Vu5RtZj90WzEOzyzkT/ pHMYoh2WW+LN0fBTTqKL4mDeqaSPxvOP3OjcMveTRxQuqpd7DlwByTLfwHlGLbkOTHHT 8JL16zzeiIc8wauOx8fSVRTrRAhpQSo5xNXihe6JtJ3X2z2irrhUrhMql54gLRmePfBE rCBW61mkM2tjk2MA8QXHV2VghjFwCmNVRBPHwfPdTp1C+SyP/GGKrt5z2tD0s18fraNG McHQ== X-Gm-Message-State: APjAAAX9moFS0fqdUDdyMkNBCo4myby787/fCjiQz6nL/WRTbgCtAdiK UY6kiWZukYLrThJZp4tIU9Q= X-Received: by 2002:a17:90a:37ac:: with SMTP id v41mr35699482pjb.6.1563290836876; Tue, 16 Jul 2019 08:27:16 -0700 (PDT) Received: from localhost.localdomain.localdomain ([2408:823c:c11:bf0:b8c3:8577:bf2f:2]) by smtp.gmail.com with ESMTPSA id h9sm27453651pgk.10.2019.07.16.08.27.08 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 16 Jul 2019 08:27:16 -0700 (PDT) From: Pengfei Li To: akpm@linux-foundation.org, willy@infradead.org Cc: urezki@gmail.com, rpenyaev@suse.de, peterz@infradead.org, guro@fb.com, rick.p.edgecombe@intel.com, rppt@linux.ibm.com, aryabinin@virtuozzo.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pengfei Li Subject: [PATCH v6 0/2] mm/vmalloc.c: improve readability and rewrite vmap_area Date: Tue, 16 Jul 2019 23:26:54 +0800 Message-Id: <20190716152656.12255-1-lpf.vector@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v5 -> v6 * patch 2: keep the comment in s_show() v4 -> v5 * Base on next-20190716 * patch 1: From Uladzislau Rezki (Sony) (author) - https://lkml.org/lkml/2019/7/16/276 * patch 2: Use v3 v3 -> v4: * Base on next-20190711 * patch 1: From: Uladzislau Rezki (Sony) (author) - https://lkml.org/lkml/2019/7/3/661 * patch 2: Modify the layout of struct vmap_area for readability v2 -> v3: * patch 1-4: Abandoned * patch 5: - Eliminate "flags" (suggested by Uladzislau Rezki) - Base on https://lkml.org/lkml/2019/6/6/455 and https://lkml.org/lkml/2019/7/3/661 v1 -> v2: * patch 3: Rename __find_vmap_area to __search_va_in_busy_tree instead of __search_va_from_busy_tree. * patch 5: Add motivation and necessary test data to the commit message. * patch 5: Let va->flags use only some low bits of va_start instead of completely overwriting va_start. The current implementation of struct vmap_area wasted space. After applying this commit, sizeof(struct vmap_area) has been reduced from 11 words to 8 words. Pengfei Li (1): mm/vmalloc: modify struct vmap_area to reduce its size Uladzislau Rezki (Sony) (1): mm/vmalloc: do not keep unpurged areas in the busy tree include/linux/vmalloc.h | 20 +++++++---- mm/vmalloc.c | 76 +++++++++++++++++++++++++++++------------ 2 files changed, 67 insertions(+), 29 deletions(-) -- 2.21.0