Received: by 10.223.185.116 with SMTP id b49csp3424807wrg; Sun, 25 Feb 2018 22:52:31 -0800 (PST) X-Google-Smtp-Source: AH8x226GamUOPWHUJE7MlpJdFoj/zPp0bf1YcfjE1sVH6gTPPh/wTRDl7JH4uEj0wZDG10Dzhbmk X-Received: by 10.99.104.73 with SMTP id d70mr7569724pgc.107.1519627951614; Sun, 25 Feb 2018 22:52:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519627951; cv=none; d=google.com; s=arc-20160816; b=OYE7WDs6t1pyjZ8TBIiIObEy+KT8uhgzrw6X1SeyC+a+rsV8k0B7p+AaIQO4Lh/AwD ThmV/kF22isiA00spuR+GO8Cm2Ad86Dm4RxaVyVs4kKoWG+SATuTUx2aK6jxc4lo22y+ hOs5m8LljFEts6gNNRj2F5oMa6wTBLNUmkn6Da4KO/liSDs/vBBuO5TkQhFNwlZiacuG AaVuP7VHLSCbzycizlGiA+T3wU4bfUxs+4CRRBWmx8zv0langMwHaIw4gCHk1R6PfF0M t5Rihb03olsb7e2kAKajeQ/vvO9pKq7bnZT/fSuieVz7XmBbLqUpO4gwn/WYDNhiFmXV hr3g== 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=3WOwrSfoZrcjGje3c1x3HhaNgAGfHlFcjuwprip2nGo=; b=Jx01LCOkSsCVrzoAj/nHfvshywQwjN5RVLPN8NHV00vOpi+VDYm5rAcyIal6zLslZj GenvEDKx4/YxY/rpSP+TmKd3fHA2PkwGUk6oeWZTtYP/EWXY8o9RnZAA17ws+DEetB8A 9rl0yrmr/c3VShJIrScai6GmVZU1Vc8MpyltGalbTPp9xC2xn/UFeiWA1lOaFpDY5YlI K2Ul5Tv8110YcclvScd2hrPbLlDYlRSGC7CHSBVQ+GDihB6Mi+e75K5Gb68IYYp9iHXW hac6KjnEh5ZUNclZkD+w9ONXJTjBrpYPoXduj+3m7S3Nu1eRnQoYFBygLKRg5ftUfMfb x7AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kcqj8cQj; 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 t6si4258145pgs.315.2018.02.25.22.52.17; Sun, 25 Feb 2018 22:52:31 -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=pass header.i=@gmail.com header.s=20161025 header.b=kcqj8cQj; 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 S1752161AbeBZGun (ORCPT + 99 others); Mon, 26 Feb 2018 01:50:43 -0500 Received: from mail-pl0-f50.google.com ([209.85.160.50]:42058 "EHLO mail-pl0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751153AbeBZGul (ORCPT ); Mon, 26 Feb 2018 01:50:41 -0500 Received: by mail-pl0-f50.google.com with SMTP id 31so8754979ple.9 for ; Sun, 25 Feb 2018 22:50:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3WOwrSfoZrcjGje3c1x3HhaNgAGfHlFcjuwprip2nGo=; b=kcqj8cQjLfufcH+39Q6oWuCw5+9ynKRy+wGLKSdl8Ty8JNFnakXetFXfbJfUQDZQHS LpJC34Oi2KWJTy0YovfNEMwARREVSwSZvXz0eh+Z0iYHpjSRh2lMX76NJsOlFt9g8/UJ VlzMUw1kD/SeA3u5tZ0DiibuVo55rjxt7Hb8YMy/fUOLECc58KGZR/FbL1uV82Ak8yxU 6aOToC3W1IDBGIqcipWpXa0s7oqmaKGH+kS1RVIAx2g4GQvL2ESb5qM1BPEePrite2+4 emfxsUDD/a+1ZE4b6/S2JjLMQ6wui5yM8DucZRXr6prsDav6FyWbRsO1rNcF/tdfHXLa 7Cyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3WOwrSfoZrcjGje3c1x3HhaNgAGfHlFcjuwprip2nGo=; b=kCHkkKPYknz+aO6QxZVa0ohmx/GvRBV0M8rqXRZudSEq8ltF6irgoZD/2aVFJVEsn8 JW1xsZQ9cQvbIDT9Hepq4qwDf4gHB4PLU87A4Kb2crGiFG4zfzdUoYqy6bERqsoS+k6F TZfguf6zs9SlOCIIx+FktO2yMM/l4MPhOu2m+fN/xZzjv1c+frCXvSeB4RkRPVsj+XoL 23vdEhncraOsvjZ3wr9/TlTXq9lZRjRbx0jo8wqiih3A6ZYICbqwOSbniTe0c3AcpCgJ myUz4f6Cw4ca9/eOieFSSx+vVUcg/xGP3tIH9teUKThHfxZEIS3k14b3ipWjp70dps19 a+dA== X-Gm-Message-State: APf1xPCTggRGPf301xHtUj3ADYekZ+bpmeNgtdSYUWj7tax4MXtWl2Qn 3BBWELuxZBkCJxMPY+w3YdMRJ9lA X-Received: by 2002:a17:902:4643:: with SMTP id o61-v6mr9890275pld.103.1519627840685; Sun, 25 Feb 2018 22:50:40 -0800 (PST) Received: from localhost ([175.223.19.102]) by smtp.gmail.com with ESMTPSA id r62sm20725542pfi.52.2018.02.25.22.50.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Feb 2018 22:50:39 -0800 (PST) Date: Mon, 26 Feb 2018 15:50:35 +0900 From: Sergey Senozhatsky To: Minchan Kim Cc: Sergey Senozhatsky , 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: <20180226065035.GD12539@jagdpanzerIV> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180226055804.GD112402@rodete-desktop-imager.corp.google.com> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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()? -ss