Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3259970ybi; Tue, 2 Jul 2019 04:53:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5tQOXXbjco+In/y+a5bqebu227R1vuGOJwWR/0g1TUjmhSWtt/skIC+Em5h5DmYnAtnxg X-Received: by 2002:a63:6286:: with SMTP id w128mr21519599pgb.12.1562068438428; Tue, 02 Jul 2019 04:53:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562068438; cv=none; d=google.com; s=arc-20160816; b=WiVD/QlRpjPCunSYaDUA7zEAmEpGotXenfetyapea5yiPEqBjLHnAKP/upuhKjKMpr 69pI6b+TdyhkLzLmk1vALW7jcE3i1Q/smgmN4Fvd9OJJjtfb6AJ5kZjiwEh/Or8DWERc lpCUOh8SHXsGzSqz6zhly2qnqWZghSI2vUp+rdFgS6EfqtJLxlcnJ7Wquv/698yoBfOi qeigGaNKM0T5DOSlbpYI2oyisz6H2ZTbSaoLyYo6KtbAHYkWi3YeL88xWQtOkxvy47L4 wqoprJ2SC9avajy14eapjoOmjCP9ZkkXYD+HkWMAjw/7dM0YAZgrOF0tnE9NBwV4Kw64 Krkw== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=fUAgbAMqKNku6wAR/i42DQOgnry+BJIVEUNtTrD/bls=; b=zc/enzpePW57wTfnaFNRvhcOiIhd+IwHkSeyN2oDonrZpOJvE3C1nz9PuvzeV0LVlH 2PO0TJ67ICbccE05MXliDegKI1FQPJLNeU+COgMQ2VgcVSWCzcsH39Wm8s590uxPOWXO iolyxxAPkwoOtoY4HRQMDV5lYxGILqfTqW4dNjH0SQLsBVKXQZkq/csrV/N1dsMGylYw RUMiCqTcNEDlMoBmyLZKodrWmcG64bsN4RZ71mB7mKuLxIQcC66WyEVhuYvZk6A3uJgr YgyDrNhWN0RvWFn5KpWSvh+v7JfNxNjpWjuyBFCB0p/GrtEV37PzXjeSrsjbhM7/pyRx BP1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TwplpaWz; 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 x21si12962476pln.192.2019.07.02.04.53.43; Tue, 02 Jul 2019 04:53:58 -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=TwplpaWz; 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 S1726820AbfGBLwM (ORCPT + 99 others); Tue, 2 Jul 2019 07:52:12 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:46291 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726303AbfGBLwM (ORCPT ); Tue, 2 Jul 2019 07:52:12 -0400 Received: by mail-ot1-f68.google.com with SMTP id z23so16821681ote.13 for ; Tue, 02 Jul 2019 04:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=fUAgbAMqKNku6wAR/i42DQOgnry+BJIVEUNtTrD/bls=; b=TwplpaWzSJwwXJl/kevHVibUDcoZoN47NijeFdvawHyiqOjNpW3kyU8/UWXglV+VqL hiRnZ+dndcrYdDnKvMQhQNwlOkVtROB+ER9CLEXaOLg6NxsRmwHCN7L/urW2rmnx6lgG 2x764ztR3E/QoskDHkEK01aQrf1eJ+7Dz4FJLFUdJXSp+a6/gTDT6xbV5jmWyW3QNYh5 eW3/JV/e0PwYcfCRMDGR7Kxu6PJ8NuhdDZ08fzKCTqjIO73e0GJWY7RqCwBWKVf4OhgW rbGUkWqIvgoF+jjDUjtA1fy2kcPQ+JJAZ3K7SdyLMRikwFlGiV/v3GF4zy1VrWN4yZcm HY3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=fUAgbAMqKNku6wAR/i42DQOgnry+BJIVEUNtTrD/bls=; b=Fs/pD3XygRyQ1bznAKy7RBYc+mlLv7Gee28vCgqcBxax5Ma1rU7nPk2GTR+jCbDMSs K5Dy8f4wCmZnUgbjM/ydtMLnmAwFJTqQZmWLVshY1/LlwtDfXSZpyA2lOgDTTxIEBAco hsIbZUCveJtwSw6nOmRwJMr0JlNfV3ZS8T63XluuVSh6T1E5rwH+DY/wibu0cEcSBIpA TxOd0HcY0sbq/iWaicGrjPht7aYAHYQsxnE3yG+bP/K43RC2wyetuNgj5WSaHaoATubs bGsypR566VjVBaL9HlGKhU7wqIolX50BvWBHccPbX0QQVB4GHDafOtUM5RQd7OopLF2o kQDw== X-Gm-Message-State: APjAAAVOs+ObQULcbhTtBVpCs9O5mQ30LmqbvLaPRBksQ5empO4y5/k5 ollmKTmVmjksY/WfiWcEW9dNl1wWWGcD8yHu/Cs= X-Received: by 2002:a05:6830:2098:: with SMTP id y24mr1506012otq.173.1562068331167; Tue, 02 Jul 2019 04:52:11 -0700 (PDT) MIME-Version: 1.0 References: <20190630075650.8516-1-lpf.vector@gmail.com> <20190701092037.GL6376@dhcp22.suse.cz> In-Reply-To: <20190701092037.GL6376@dhcp22.suse.cz> From: oddtux Date: Tue, 2 Jul 2019 19:51:59 +0800 Message-ID: Subject: Re: [PATCH 0/5] mm/vmalloc.c: improve readability and rewrite vmap_area To: Michal Hocko Cc: akpm@linux-foundation.org, peterz@infradead.org, urezki@gmail.com, rpenyaev@suse.de, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michal Hocko =E4=BA=8E2019=E5=B9=B47=E6=9C=881=E6=97=A5= =E5=91=A8=E4=B8=80 =E4=B8=8B=E5=8D=885:20=E5=86=99=E9=81=93=EF=BC=9A > > On Sun 30-06-19 15:56:45, Pengfei Li wrote: > > 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 ti= me, > > it is possible to reduce its size by placing several members that are n= ot > > 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_ar= ea. > > > > More details can be obtained from the commit message. > > None of the commit messages talk about the motivation. Why do we want to > add quite some code to achieve this? How much do we save? This all > should be a part of the cover letter. > Hi Michal, Thank you for your comments. Sorry for the commit without any test data. I will add motivation and necessary test data in the next version. Best regards, Pengfei > > 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 readabilit= y > > 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 > > -- > Michal Hocko > SUSE Labs