Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp819152ybi; Sun, 30 Jun 2019 00:58:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsy6fk/+jzFOtjbt1YC8zxCvvenCCsbXUHHrZY7V+8fvUHmHHtMaw1nBS7v9Oyq6qa6ovq X-Received: by 2002:a63:6b07:: with SMTP id g7mr18727462pgc.325.1561881495051; Sun, 30 Jun 2019 00:58:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561881495; cv=none; d=google.com; s=arc-20160816; b=Q3pk5570Q6POLMFZG/4T2l3ZpZLge+oyCXhCnhmoDRkMfXifvUcA93IF/Jr71dhD4+ 45cr3b1CAZ2eUDy55LVkDZamYOU2xHPtmi1Hf9WX6g6sMzJQUy9yZ1j1Rj1twHE0tgGb 5dgFT6+H5YtMZIH3n+EatpXTNp3tb9KyhpsOvoB6sPzH842cq0NhT7Ey38kEVQUZN3jX Yxrf6u/hT5H/f8Q5mAcmssKTm1I1kZ3fx2wMR/5NV2p9vJIiE5yVTz3u6IqlfqFNDYS5 J8J1Jm2Cg0yqBakxHyPT83SCHyrHNgkT+lceJ471I5eONppZABuywrGoBmtfrg631R4C SU0A== 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=Zot35M/uaWueI3Zn11kPJ6IoYKlYtkLl9I4J6OvDMjU=; b=D1TjAnj18rEtnoYySghsrvp6ZczkNVryAfxeTNpwgXOzS+TVjLyO4+3b43arrvSWgI Gl44bMJZiWqw2WJbpgko12YyQdqKPgFZgAlpPD7PHJQ4mvPYDpQqgTV6qGUPX5VKCIsn QZbpNAXk6Oyu9qyLZzKDb7o4pqqzHSx6dg9iJXsPrQQc2xc4zsDLPY9P7BPsvKT9CyG3 mk13uV7DfXCi4PTivfSxNzDheotCECqqqCPpQWonew9MVTzBOFUi23RL5zWqzGT4YJ0v XgwfRT2zgBZmz+32cgVPALmQFycmYr0wZI21J91oXC6tNcND4jO/vzRlblrNBTbVy/0J Dbkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MDOAghVf; 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 w186si217192pgd.48.2019.06.30.00.57.30; Sun, 30 Jun 2019 00:58:15 -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=MDOAghVf; 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 S1726605AbfF3H5U (ORCPT + 99 others); Sun, 30 Jun 2019 03:57:20 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:37221 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725959AbfF3H5U (ORCPT ); Sun, 30 Jun 2019 03:57:20 -0400 Received: by mail-pf1-f193.google.com with SMTP id 19so5033817pfa.4 for ; Sun, 30 Jun 2019 00:57:20 -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=Zot35M/uaWueI3Zn11kPJ6IoYKlYtkLl9I4J6OvDMjU=; b=MDOAghVfP0e9bM/YbPeMmPhQMwo21Fzh3ULYKrYMmY51cSPsMd0TKeTq2mz0MMAQqh 2FxILl8UP4nlrKoUX1a2KqBTRUVC21XguujryIxOEmbrKUhiJXlZuDumw8UMmP/Wy6zf X56oMJ4bEzANTKRWLKZs6gUUMFh00IBTpWHmvmMUTR5NuL/45yh9AjzHHMyvI1qi28bg jPvu93egb0PNGacqq0d7lfCrRJC1N9HDSYGv6k81Jjnwt/eRYqe1rRMAA9mokS7ubI2H 9xT3VZtB9lXk8hW8a1r9Mk2+yYBTBNwiJGntmIKAc8fEtazTjLIxl2CT2Y6oAGt4g6GF ElLw== 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=Zot35M/uaWueI3Zn11kPJ6IoYKlYtkLl9I4J6OvDMjU=; b=CeUOI5YPId8bJ9JI27GK6YI+MnzoGXHyBLYLOHyUe3fVxT5YqHZA2C9AL/Atge7HLq HyzcrQiVaciecnzl1Gn1QvwVX2xww1PrSxEWzMMzdJTgucB8GtCNHacIan7Y+TuVJ2vX taVKvkoeSENG3QBQeobekY0nuXv5Uw9XFDaarcAmrfJmpTE+9dm8zMsm6oCbW8Etw09N /BLYYRjde+Yz6XiA8IX8nUkDTGkb+ZON9PrxBN0lH4O60lacRLgvMzzwEYRz+epcGNoW ZPAQokxR4rVL43xxCm/dGIcFkjqmHKf9PUA7Y0IswDVWj3+wtVPWhL+PMLl24ypcPUNh hWrA== X-Gm-Message-State: APjAAAVno3eXxIkgngG/LwepPWry+4k4HWXPj+0Vp76tKGTYBPPYRp4B rNn6U3VJOQEnMsmQDnD+mlA= X-Received: by 2002:a65:4085:: with SMTP id t5mr18419154pgp.109.1561881439844; Sun, 30 Jun 2019 00:57:19 -0700 (PDT) Received: from localhost.localdomain.localdomain ([2408:823c:c11:648:b8c3:8577:bf2f:2]) by smtp.gmail.com with ESMTPSA id w10sm5989637pgs.32.2019.06.30.00.57.11 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 30 Jun 2019 00:57:19 -0700 (PDT) From: Pengfei Li To: akpm@linux-foundation.org, peterz@infradead.org, urezki@gmail.com Cc: rpenyaev@suse.de, mhocko@suse.com, guro@fb.com, aryabinin@virtuozzo.com, rppt@linux.ibm.com, mingo@kernel.org, rick.p.edgecombe@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pengfei Li Subject: [PATCH 0/5] mm/vmalloc.c: improve readability and rewrite vmap_area Date: Sun, 30 Jun 2019 15:56:45 +0800 Message-Id: <20190630075650.8516-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 Hi, This series of patches is to reduce the size of struct vmap_area. Since the members of struct vmap_area are not being used at the same time, it is possible to reduce its size by placing several members that are not used at the same time in a union. The first 4 patches did some preparatory work for this and improved readability. The fifth patch is the main patch, it did the work of rewriting vmap_area. More details can be obtained from the commit message. Thanks, Pengfei Pengfei Li (5): mm/vmalloc.c: Introduce a wrapper function of insert_vmap_area() mm/vmalloc.c: Introduce a wrapper function of insert_vmap_area_augment() mm/vmalloc.c: Rename function __find_vmap_area() for readability mm/vmalloc.c: Modify function merge_or_add_vmap_area() for readability mm/vmalloc.c: Rewrite struct vmap_area to reduce its size include/linux/vmalloc.h | 28 +++++--- mm/vmalloc.c | 144 +++++++++++++++++++++++++++------------- 2 files changed, 117 insertions(+), 55 deletions(-) -- 2.21.0