Received: by 10.223.185.116 with SMTP id b49csp3385277wrg; Sun, 25 Feb 2018 21:50:26 -0800 (PST) X-Google-Smtp-Source: AG47ELut6elgcWZHTHdUQa++yJSreF+oaczBz2PTKnCiTEVnJUH64OjLVlbDo1QfhncgqsGYsuBp X-Received: by 2002:a17:902:8a8d:: with SMTP id p13-v6mr6029746plo.144.1519624226726; Sun, 25 Feb 2018 21:50:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519624226; cv=none; d=google.com; s=arc-20160816; b=OP+T17sXmhfgpyBWEmIO4dvMgbQvPKrgKCduhJivBSxFKIxPV2dixWpL4RZ8B7M0iE fQszD1xaH1Qgch4GFMaoJNIAbJb6tSbtr/BEkWSx8CgRVRSHmkHrw68O2wL//veCFd/9 53nIV+fP+k2Z0LDhaZgytBSBHIDUaVlMiT5F7vQfhdHCERPqrg+cXCemelGzlt3+jFse mVS8tt3ChDRlz6xVhz/T5dpSHDZ5mRVq9XJbp3zy9gxxgM3W8hD1AHdy/yYryM7dUzEe Zsn8qGuNhjZyO/ancXHq+KTNB2S4nvUJZ3HmEOmZ++aUXX7K8UxtK183BtU0q3DKe6E2 haDA== 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=piNvctqlnt4fEOkVCipXeCM6USU4UPmg+HDBvhbfR+k=; b=t83pwcn4QzhvsQUWTlYrdB/A+FZqOiQQuHpkdoWcXqNP2app14INmMaH3QCZFIPhLJ vX1UjerQtnlpDYaWt4tDfh1r427n/E4cHYpsBNuiHzN2qMyPXqLd/UU4QEVUAWVeMk4J fU6hyQdaSD4SpKd/4/cv381IenaQ55D9ZY8OFCKbh99tnQ5VOUIK7KjujsZtIWEQope0 Jx4n1LASkaypeXMgQxIJCuGKZ/0qM71uduzBVSGwxJ6YW9IaUlkeT4fvB4hsDohUWJRA JyQNMTT1oQdqjBZmN869JIC12qgq5xnhSiAFVGG6Jb72VXfm0181QnpRse9cEfRDblDh 4Apw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IVXIWeJK; 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 j15-v6si6391314pli.649.2018.02.25.21.50.12; Sun, 25 Feb 2018 21:50:26 -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=IVXIWeJK; 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 S1752030AbeBZFtd (ORCPT + 99 others); Mon, 26 Feb 2018 00:49:33 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:36478 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750807AbeBZFtc (ORCPT ); Mon, 26 Feb 2018 00:49:32 -0500 Received: by mail-pg0-f68.google.com with SMTP id i14so893119pgv.3 for ; Sun, 25 Feb 2018 21:49:32 -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=piNvctqlnt4fEOkVCipXeCM6USU4UPmg+HDBvhbfR+k=; b=IVXIWeJKNpHHf1CxFSNs5Jn4+UqA5QWXpiB+LVf1GHEC0mx+Jt/r07ABkrJGCgyU+v bK20bRr9pj/DanIboWJf40A89kRY0REHsBLUXNSZ8Yql7ssfFsdEp8AFGncST821D5oy SdY0y6UlCd3MR0+/o00u7z3hDziiJpyPjfWhk2sajYUNaev6qJ0Bekb3ngqHHM+qtTPX gvS6vofusw3jekZ6gnY33x7e04D/dD0DrjX/ptj22gtIFpJusRblzEhWmmRYD0bgd9SD F6ReePQwsYiXZQ4gKG7MjlVWOsBECz2d9LoNeAUUZEwzCQy3pcQM4M3M8oLK7/Zmfo+D VJ0g== 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=piNvctqlnt4fEOkVCipXeCM6USU4UPmg+HDBvhbfR+k=; b=SEFZOLsLz+wTll59pfTXgWsTz2JyROVqDCbURinS84oQrXQB5+L+765vvX1USDu1oW +NF+PL+NnAFAsiks58D6oQ60Xg6bLIoIdgV2GF93jd4SQp3OFPboQdi5xlembsxY3mnb NA7nHyO9+TzP84royquX2A0m3f1Nt/ZA8DQGD941StJW7DNZyGjaVVf+7/s+R9EiVvve VURbtAMAi8m80T9sYLQiWE4KY3aggxStir9yNAoTF/q46blOdE2xyYMk7kcfOzt4gYiv XOffftDpSc/qV0d49ow3dA+12A+Xyt7rMA65bOTFgdW8ehyJ3o2rYqKmebXo+gr3pf+D kDBg== X-Gm-Message-State: APf1xPAqYJzZ0uun5XHe5IAeaNjRp4sJNcCUNCitp3bBm6BsIcxGN0Pf qCo0MFLaxcL70yGB2sYV+mY= X-Received: by 10.99.96.73 with SMTP id u70mr7297238pgb.199.1519624172266; Sun, 25 Feb 2018 21:49:32 -0800 (PST) Received: from localhost ([175.223.19.102]) by smtp.gmail.com with ESMTPSA id 70sm8636390pgb.86.2018.02.25.21.49.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Feb 2018 21:49:30 -0800 (PST) Date: Mon, 26 Feb 2018 14:49:27 +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: <20180226054927.GA12539@jagdpanzerIV> References: <20180210082321.17798-1-sergey.senozhatsky@gmail.com> <20180214055747.8420-1-sergey.senozhatsky@gmail.com> <20180220012429.GA186771@rodete-desktop-imager.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180220012429.GA186771@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/20/18 10:24), Minchan Kim wrote: > Hi Sergey, [..] > Sorry for the long delay. I was horribly busy for a few weeks. ;-( My turn to say "Sorry for the delay" :) [..] > I think it's simple enough. :) 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. > Can't zram ask to zsmalloc about what size is for hugeobject from? > With that, zram can save the wartermark in itself and use it. > What I mean is as follows, > > zram: > 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 in _zs_huge_object()? -ss