Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp870858ybi; Tue, 16 Jul 2019 06:27:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPWigQ6Pp5fT3RG6zVHSHakQWlhu98VRrTREIylgwVUxQbSFqrPwnuF44n9E8cVd3W/P+A X-Received: by 2002:a17:902:9a07:: with SMTP id v7mr25444937plp.245.1563283647730; Tue, 16 Jul 2019 06:27:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563283647; cv=none; d=google.com; s=arc-20160816; b=TIzVcQybu01Tc/x2JmwUMWXw9NIbQJJv/gydmfg2QI84q2H+DzhDDpSW83T9yBTo8W xjKQ+1w6LgjO2sqoO3Dp2iYhmBKMAC/eho5go6BJq/6JGyDbLA0I8kkshX34Lv0xFQJl yQcfep0dev65v3zIuts91LqrEIvioYZHU8Xg/EXacLyXZvIsftPEjKEF8mkFXVrGdiEd gu7cPOIJ5YCjir1HT2sJSyAJPIHD+RpRhvBuEWtMVGpjrICFmOOW56ixIQKqCVwrP6Ek rr4DOLEETn48+XOzZrhw9YlJJEs7ZqrgStz0xCYb6lyQ46XD/J+3GWLdSLgAq5BMA90C h1Tg== 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=iNuXYfJpH7xodxMP8TOSGp32e8S4xkphHFsCZYElfVY=; b=iHug4VHtsaWMP1Y5frRjDVlfDROk0RpkO/NxSlsN2DOoxUxpmedtLiCS7WtRhdXo5R F3kjoxN8rOOJdQtyHhAz+VheqxcGYCU3qDOcUI24ivCTjLHUPCVssr1yLqtgrtmaMipD rhfZC7MhW84PQg4QIfgFT68RtSZHeudTL7U+IGyiVwgj1h0rHFD6qGE11E9lArXM5igp NOI50RxaQnM0GTzgD+/0sJ8SmLEaLgL8TSIUYACyrhtHeBOZniVFw9Aoe+KhqIQKtOU1 Fsz96rdYTMz/xdchHGtlIXw4DNkgjhFoxZRTwL2GnIJOMIWQlHYuQZ1raPT/1/MybbPO D5yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O85w6Uft; 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 f8si20063355pfn.43.2019.07.16.06.27.10; Tue, 16 Jul 2019 06:27:27 -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=O85w6Uft; 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 S2387563AbfGPN0l (ORCPT + 99 others); Tue, 16 Jul 2019 09:26:41 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:42424 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbfGPN0l (ORCPT ); Tue, 16 Jul 2019 09:26:41 -0400 Received: by mail-pg1-f193.google.com with SMTP id t132so9442830pgb.9 for ; Tue, 16 Jul 2019 06:26:41 -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=iNuXYfJpH7xodxMP8TOSGp32e8S4xkphHFsCZYElfVY=; b=O85w6UftvzCE5S7QNcUPHTwRK89UOIVN5UwkFUBVkoJlgzFkrecIe1HCHZxp8XpTpc LUsUclB+E0i+ylxp3D4lng3UpJtIw1gZXPwBcCaJKcOivr+2o+5GI9PbWUU8w2l4ssaM Qtr9x++RI1Bqm8fFQo7D8JkNWH1KOLvF6koLHwDvY5GzS6HhmQNvb3lah7Oib81HpAUW H5STE9MUFYLpzD/VPToXLQZvmF8aqc9g44wgHJrkD0G6zhs92+jqI5ntp2oCI5TampeZ K+RZc+cL1r1vBvh6vYS5CrrUA77bkwWs9B5APzX0SBgrGjo3Rvd1OWxrYMsqirI00fIB Npbg== 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=iNuXYfJpH7xodxMP8TOSGp32e8S4xkphHFsCZYElfVY=; b=b7aH31K8g3pTUop35jx7sAUqQrYfKwwjyNBYrz0zt7GdTSAs1cB5/rGt+zD4qydyJa UR33cobUiT818eQ4Q0yLMh1omOAfre6xLXZOOm+xpglnSHLdPuz4l35zZ+IZQBqjL2Z8 gUDeUvNQcVt0RJoHHX8xdtrGh5lbrc635Pi4Pq76T6GYiZ3h6piwYdi+rWkcgoQcGWDX 0tZdEdILoG6HfLtvpbDjzI1WBmlA4EcoJNnhghKclkgljl53Lhu4LFB198s/iT24nPmu 8ID0g6obFz5ify75hNww2CWIcsOxBoVvBxdTT1KykfsbY0MOzO0v1x1prn1uW9POoiA5 1yBw== X-Gm-Message-State: APjAAAXTMKmqyKotntTv3CtHcf2XsoXo0HBJ8w1GzL4eS1vuYN/31GlC dOYbRnk6JHpTFUUfWxEiU2g= X-Received: by 2002:a63:6eca:: with SMTP id j193mr33082479pgc.74.1563283600675; Tue, 16 Jul 2019 06:26:40 -0700 (PDT) Received: from localhost.localdomain.localdomain ([2408:823c:c11:bf0:b8c3:8577:bf2f:2]) by smtp.gmail.com with ESMTPSA id q1sm21472311pfg.84.2019.07.16.06.26.33 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 16 Jul 2019 06:26:39 -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 v5 0/2] mm/vmalloc.c: improve readability and rewrite vmap_area Date: Tue, 16 Jul 2019 21:26:02 +0800 Message-Id: <20190716132604.28289-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 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