Received: by 10.223.185.116 with SMTP id b49csp3462405wrg; Sun, 25 Feb 2018 23:47:53 -0800 (PST) X-Google-Smtp-Source: AG47ELvPwUrkfNCdNW48v/vt59+z9d4HbQrfgAexQWasBb/6U5JRLBljbacavYUa9v0xSYgjYF3J X-Received: by 2002:a17:902:7612:: with SMTP id k18-v6mr2810887pll.397.1519631273537; Sun, 25 Feb 2018 23:47:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519631273; cv=none; d=google.com; s=arc-20160816; b=mLo6ayHcXQvApLYfSe3ryh8mwbt3asKMc5uxqicBV759vAkC6/GDfYds6uF0AsyWj9 mNdhCsdM43OWpKdMyWxEIE0kumv/hZmsL93eW1rWlKuKgcYWFqe9gihyJRy7bs1OhReQ a5TQWSosmVueani5ydMSttvaO7z/1cJs4sBG6V267BRWZWtcet+yoApYzmEidmTVDAqu 4FCpq/Km36f36PwTvoGjuFEZVwjpf2jAbC5EyiAhVULAOAzF8tF3R7/J0aCpK3U0j5kX uzL/jX8Kmp1+BKwMg/KwrtAEyJ1byJUZU75Ag1aDS3loldWXGu0j86UZnJ2TyR/zJPNL gS7g== 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:from:date:dkim-signature:arc-authentication-results; bh=UtHcwHZExhfBxGdS6NudoVW5e4VBTMbS0ayPc8fe/XU=; b=Tgm4S222+pkt5HN4+LFJCaCNiE6nxAQ8zImFHYFmsA+jAjO+sQhGm3yyOIGycF2d+3 kpAZ3gnYQx3q0nTGAkN/DFckHZxeZin1UaHMEXZv6QF+7G3ieqhgjI4yUEaIEGSLVV8m gOFpYMF3D76/A529XBgKeo9Ri052Xr4jwcibKTyn7o03tZPp67L8EbpaUsB3uxg5iOrR NCePXOIEeHbfNgzopmjnegVRlAbypeElc7rWe0uRxKeVq1VM4/xkYn+o6nmS1nWU6g4O OYB+02Ams+5Y3kZbYJVAbvy4rkSLSmcsHywohYu9n6bchgR0re/BwxoG4OYxLZDUZTdK 3zaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=f6JUGlVr; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 20si6342239pfp.312.2018.02.25.23.47.39; Sun, 25 Feb 2018 23:47:53 -0800 (PST) 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=fail header.i=@gmail.com header.s=20161025 header.b=f6JUGlVr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752112AbeBZHq7 (ORCPT + 99 others); Mon, 26 Feb 2018 02:46:59 -0500 Received: from mail-it0-f54.google.com ([209.85.214.54]:54599 "EHLO mail-it0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751014AbeBZHq6 (ORCPT ); Mon, 26 Feb 2018 02:46:58 -0500 Received: by mail-it0-f54.google.com with SMTP id c11so423636ith.4 for ; Sun, 25 Feb 2018 23:46:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UtHcwHZExhfBxGdS6NudoVW5e4VBTMbS0ayPc8fe/XU=; b=f6JUGlVrEgrUh3BllhwkEKNQjwDz0K1lSyG9GAYrqCR5tfgdh3nGSJP01NMBJ/bLIs MpccS8Us268FVk5y1dpavU+bwELON94uka374bYnAJrknAb17f6WZnLs636xnwOoXeJq kFmz8d2SIvC/d1G++3RIUP6byAxha5Vc17OuU/c/v+b2VNX1Te3Cb9G1/6Hpz5v5hH99 vIsvoeOp3C95Klr59AB216ynax5Or7EukVrA27/FOMgFrESOjuebVfxJ/phsIDZkJpZY ckfSW/lJxezfH6efushpphQyNRrFwmXIzChjN7DIm85uYdBSMoMF6cfdzyJ2repodRP4 vC8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=UtHcwHZExhfBxGdS6NudoVW5e4VBTMbS0ayPc8fe/XU=; b=q1r8ZHDsCOTLsWeUm6kSyJSFRavPBDMJnk982Y/8+hgZZ78vrJHOlxNL6xqZ9K2Al3 Q2t4IsxdIbudOD3IQouwI6BC3w0GfIKJCWKt3/xF5T1RKRLo4Nulrz2IRfhfv8TzvTww 0l1e6f3fJTWlft0SH+YerVTYP9mxbGLKJOctMQtNqitehWvX/olonhoJs51EnI8k5DK7 TkU+kqix04Djr91bMfbSujY+f5GSdolnEpRut8PsBIFs5C/WhOBOgPdGI0EfYaVRpDDI nIUuirnu33RcGeEx64PlTSzPxcllXgIE4S6gACF9v1+evKlSXddIl4dYPEzjkjEHHGwP fJow== X-Gm-Message-State: APf1xPA5FzzTOkLJR1la+L/QvL+E4ku2FmkjIBXHqQS2eu0NDa5L6xsN EzNKzX+oeTg4gmNu4cJSM0OX+T5D X-Received: by 10.36.3.67 with SMTP id e64mr11680762ite.46.1519631217738; Sun, 25 Feb 2018 23:46:57 -0800 (PST) Received: from rodete-desktop-imager.corp.google.com ([172.30.114.13]) by smtp.gmail.com with ESMTPSA id 195sm5055089iof.9.2018.02.25.23.46.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Feb 2018 23:46:56 -0800 (PST) Date: Mon, 26 Feb 2018 16:46:52 +0900 From: Minchan Kim To: Sergey Senozhatsky Cc: Andrew Morton , Mike Rapoport , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Sergey Senozhatsky Subject: Re: [PATCHv3 1/2] zsmalloc: introduce zs_huge_object() function Message-ID: <20180226074652.GB168047@rodete-desktop-imager.corp.google.com> References: <20180210082321.17798-1-sergey.senozhatsky@gmail.com> <20180214055747.8420-1-sergey.senozhatsky@gmail.com> <20180220012429.GA186771@rodete-desktop-imager.corp.google.com> <20180226054927.GA12539@jagdpanzerIV> <20180226055804.GD112402@rodete-desktop-imager.corp.google.com> <20180226065035.GD12539@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180226065035.GD12539@jagdpanzerIV> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 26, 2018 at 03:50:35PM +0900, Sergey Senozhatsky wrote: > On (02/26/18 14:58), Minchan Kim wrote: > [..] > > > Right. The changes are pretty trivial, that's why I kept then in > > > 2 simple patches. Besides, I didn't want to mix zsmalloc and zram > > > changes. > > > > As I said earlier, it's not thing we usually do, at least, MM. > > Anyway, I don't want to insist on it because it depends each > > person's point of view what's the better for review, git-bisect. > > Thanks :) > > > > > size_t huge_size = _zs_huge_object(pool); > > > > .. > > > > .. > > > > if (comp_size >= huge_size) > > > > memcpy(dst, src, 4K); > > > > > > Yes, can do. My plan was to keep it completely internally to zsmalloc. > > > Who knows, it might become smart enough one day to do something more > > > than just size comparison. Any reason you used that leading underscore > > > > Let's do that in future if someone want it. :) > > OK. > > > > in _zs_huge_object()? > > > > > > Nope. It's just typo. Let's think better name. > > How about using zs_huge_size()? > > hm, I think `huge_size' on it's own is a bit general and cryptic. > zs_huge_object_size() or zs_huge_class_size()? I wanted to use more general word to hide zsmalloc internal but I realized it's really impossible to hide them all. If so, let's use zs_huge_class_size and then let's add big fat comment what the API represents in there. Thanks, Sergey!