Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4339967ybi; Mon, 15 Jul 2019 07:30:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1BKS8z5dLhnv5xl9AseTEn8uqFlpGlwtwGEc9ZrP5TZalfJK51HA9AFOI7ydU3hhNobuH X-Received: by 2002:a17:902:7088:: with SMTP id z8mr29168825plk.125.1563201015461; Mon, 15 Jul 2019 07:30:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563201015; cv=none; d=google.com; s=arc-20160816; b=Iu1B5/JX36cudEPUmewGDBS47+w1OiqOboFrfD6qkOaUwJxHvQXNstSxjYSx4LDCx8 1qLammSIKkYveaJ920zRpKyhr8PkSA5v98TeM9DPU+x5cDGRnFrNTRoBTEir8YxeKhi3 VHuYGTkvMVTLkbI3X9Q6qKhunA00pjsFn1t9Fe98zQ6CXJeEYwxbrmLwh9gpzVEnrJ1g 0vSqZaN/mK/sAwjCTd1a0lYSu6hkUFcmbyQbRWdNJrB/rk8LRd+TGR5gvGbBnccKvXo9 ItVdpCAqIa9w6H/5mgUMExtub4euVxqjqai0tLix8iokT3VXeplFPQj4JcmQcul4qQVP aing== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=5jX8RO2G+Dqveq3/9ZIxcRNHFe4mw3shiUGtuynCPU0=; b=pITu+k70MuLgrCXVn30YKRviTUK6r/kNRNc1TsG5PKAKTCQP/mkQccVZdRSJEHSJug MGsr2MvCuT2w3DUj/xVedWxLeA5XuypreF3onK1XzgLOUPRPLUNJqPaBHretydMScF40 BPv4+4aGCNezfXcCVjZU8Fwaby2H4FiioSnp3H1djbbaAHzRaoQvVL2EDDkWWj/BAo8x 9DBD/X+nvT99kW19DAQsaDKTU878jhtEO+RiyMhNvCVNAQvExgk2DaD/uoKPEIKcaRGn 2pngSBJeBMp8RXpApcgMaZ2NIWFRaW0TkstAGfHHO+rlH485V8Jiz6q8zzsW/JJGocaG FUAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="d3/14IV3"; 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 t70si16511750pgd.573.2019.07.15.07.29.59; Mon, 15 Jul 2019 07:30: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="d3/14IV3"; 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 S2390944AbfGOO2k (ORCPT + 99 others); Mon, 15 Jul 2019 10:28:40 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:46878 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403776AbfGOO2G (ORCPT ); Mon, 15 Jul 2019 10:28:06 -0400 Received: by mail-lj1-f194.google.com with SMTP id v24so16453853ljg.13 for ; Mon, 15 Jul 2019 07:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5jX8RO2G+Dqveq3/9ZIxcRNHFe4mw3shiUGtuynCPU0=; b=d3/14IV3hSNMRDcLy989ICz3liv+mqjjSlW0El1mnKf1DOz5JPMkYTV5X2XfM5proK 7k1eaAzv9eAe8s9ElN5YSGhnIIHix6PHO4WbLxrSC1Bg4CShvJ3rN8GrZwK9Jrwdixy7 ziRX3kHL4P0X4Pmx2CRPhDuGSUllqNrR1M2ZTm4YgAoiYdRnRa1OC4xD0LMuspJXA3Ve /COxemWlBI3Tl3LClQBSKECiteCiSHEDi4eENFT4WOBuaJ+vsdwS8pMcHCDEH1zrFFZc mHIW/MTCDKpoRtJlx8Tw5ldTVnsDbi9sOGSzb2tLaXUDKnurnKlvpB6+BVs3v3a3XZpg 0lkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5jX8RO2G+Dqveq3/9ZIxcRNHFe4mw3shiUGtuynCPU0=; b=RiF7g4Spq8DEAQ4LFr36i23ZKrxJXBKVYqEFXCLKUlvL7NiLZH1Gn7sUXUfzXEmHLs Y+IJIOn+zFVrtunrKHyLwcKPEnVF2/VgNtd2lObgR2QD5w9fTHpKsbiXvktWdRMWVday 1jKW4mD3hTnePEijx7N9X9gGTu7XY1VLlHdxw1fbsYsmKJPqrZwVRp5alZzv+l8ZN8ch sMCEhAb4ca3MWDHx14D5DMF+TO79UHIasYJ0dmLsGKEM4QnZx1yjTCLY0Ol+zQAHOi5z Px+iC+bBQbAayfz1D8ztZ3SgrTXW7nw7QVYEheUdtpk/Tdoz54LRBel/AERp/Qa4M4C6 0mhw== X-Gm-Message-State: APjAAAVKL7DIFLQZPMtZnSJROidCjsrgmlJY4uJ9i9qu2H+sLG99pdys eFHXzn6fiV91wUB2tJXVXQA= X-Received: by 2002:a2e:968f:: with SMTP id q15mr9362552lji.30.1563200884282; Mon, 15 Jul 2019 07:28:04 -0700 (PDT) Received: from pc636 ([37.139.158.167]) by smtp.gmail.com with ESMTPSA id h4sm3209138ljj.31.2019.07.15.07.28.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Jul 2019 07:28:03 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Mon, 15 Jul 2019 16:27:54 +0200 To: Pengfei Li Cc: Matthew Wilcox , Andrew Morton , Uladzislau Rezki , 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 Subject: Re: [PATCH v4 2/2] mm/vmalloc.c: Modify struct vmap_area to reduce its size Message-ID: <20190715142754.pw55g4b2l6lzoznn@pc636> References: <20190712120213.2825-1-lpf.vector@gmail.com> <20190712120213.2825-3-lpf.vector@gmail.com> <20190712134955.GV32320@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 12, 2019 at 11:09:00PM +0800, Pengfei Li wrote: > On Fri, Jul 12, 2019 at 9:49 PM Matthew Wilcox wrote: > > > > On Fri, Jul 12, 2019 at 08:02:13PM +0800, Pengfei Li wrote: > > > > I don't think you need struct union struct union. Because llist_node > > is just a pointer, you can get the same savings with just: > > > > union { > > struct llist_node purge_list; > > struct vm_struct *vm; > > unsigned long subtree_max_size; > > }; > > > > Thanks for your comments. > > As you said, I did this in v3. > https://patchwork.kernel.org/patch/11031507/ > > The reason why I use struct union struct in v4 is that I want to > express "in the tree" and "in the purge list" are two completely > isolated cases. > I think that is odd. Your v3 was fine to me. All that mess with struct union struct makes it weird, so having just comments there is enough, imho. - __free_vmap_area(va); + merge_or_add_vmap_area(va, + &free_vmap_area_root, &free_vmap_area_list); + Should not be done in this patch. I can re-spin "mm/vmalloc: do not keep unpurged areas in the busy tree" and add it there. So, as a result we will not modify unlink_va() function. Thus, this patch will reduce the size only, and will not touch other parts. -- Vlad Rezki