Received: by 10.223.185.116 with SMTP id b49csp284857wrg; Tue, 13 Feb 2018 21:53:22 -0800 (PST) X-Google-Smtp-Source: AH8x227zZGPwxdu5pOcPJYxpxnrcKVyU1B3hcq7X2hMPKe+3i91ZQCRRjVUSgXBYQBzh1HcBOeYn X-Received: by 10.99.137.195 with SMTP id v186mr2965367pgd.90.1518587602077; Tue, 13 Feb 2018 21:53:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518587602; cv=none; d=google.com; s=arc-20160816; b=Y//ObWQh+BwpqW4FAQQbwnBkGc9OR8YEULDyvtCgVb7DasdfxjeIwz62vibUv2y4l4 2uj1++MlQEYGi3CRSQetaeVgNXT/H+7vQpdAjEf3YUP5d28U3E6Dk4V5hNZS9fxuWrYU Yz3m2Ziqk0MyWqYNkFqQrs0v4gGdFHW/h08rkkfjiavksnrfZkQBwZ5B8nwVYR++U1NE jSJ5gFkDtGwBUhUF9zzDZyBzBhqkmdAOrnuAIiovEykUiauVP+8olHLaWr+/6xiXxgZ9 e5kReQQtwclfnPOcWEvCJ5NUe5STPyCLdSTSjwNZxGRQ1sO8LxLpki5IEFSKdoO/dU1B AdUw== 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=Rs2oetFu2BjHDaBzW5rnhzAgrRszy2YVRKdb6IOnKME=; b=s8Co4hbTa4o/8n8AsGKhERK401wDyzA5131roVkdCPuqeIPqHXUXg0/kTwl4uvfCp7 WwlvBooqKOfZGZZQE0V11rXvJD/rRIiSZ1hRXTITjtiJlexxQuOz/5Mh9W+xyA45Z1Ft zAdhm9Kisk3KnNO8CeAm+0BLoWA7Y0T5a0fIqt0SsuQtdl1QJjse0KwCHWPAubKroyeO uG55Ge6HURqmvyWW3IceaBJWMusRNLU5jp7LgPWFCFeZdiuD7a8iU/44OEPsnZ/6pwQw gaZK2OMTUnDkUIqjBUUaMSHRXGZTdI2Uea1G6Q2l9mWq48W7CfSNCJ+NfsvnPiR4d9G6 oVCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dxsqMvVr; 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 u2-v6si883780plr.50.2018.02.13.21.53.07; Tue, 13 Feb 2018 21:53:22 -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=dxsqMvVr; 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 S1753164AbeBNFwa (ORCPT + 99 others); Wed, 14 Feb 2018 00:52:30 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:36895 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751384AbeBNFw2 (ORCPT ); Wed, 14 Feb 2018 00:52:28 -0500 Received: by mail-pg0-f68.google.com with SMTP id o1so1559909pgn.4 for ; Tue, 13 Feb 2018 21:52:28 -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=Rs2oetFu2BjHDaBzW5rnhzAgrRszy2YVRKdb6IOnKME=; b=dxsqMvVrI7DVF4pvq9Pv78AQizrko8r4qZ2BRPZCbKOkDieN03tk3nJpFuocj2W7MC rXDA7A6SRrxebD87HUicdmVa9UUm2F4/IM/6+MLuB9cps6ZR9hAHtXJbZocvnpCG6NJ6 MuNwz9vDJ3aWeIPgSc+ezPZAjL0tzFrFugmIbIm3PxHWNQI4TQdrUkjccT7lxxCEFy4V MWfJOgvI6fWWmK+Ql8XpfwLpxEZPyawbSTke1d5ZYB+r5QnzByQIwvQN0zRvnBANIJaZ w/8jPvNhKn/jaXiMEjYpUCadP1lxNHUUDG5I5OOOV6XxWN+lVw2IYoF+Ep7fwcvKKTn1 FibQ== 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=Rs2oetFu2BjHDaBzW5rnhzAgrRszy2YVRKdb6IOnKME=; b=MGXXP/cWNQjDoM0xgVMQKDq+169JZlzxs+nMLA0CbZ2qLpOLVhTZYpdLlbMZ+oOEtI m62hMAtLrHX1lau4Os3Wv8ZcIBKUy6YLzgPUsTO5xD/TdLKKPdb1sBzoWjMxYMxlOLtN w+UVgJvin3/cIk5ZayBp1tByjJxtA7xzQZ2XHoIKNtM6frKtY2VuJv/DWqx/QwR9X0GT 9pjwYTzGaJxhsQOXMlvALbxDlv7DwLvb6kpyFjYGYmozr7RW2CqZbA4uy79gYBEhIQWA ltB9mcme8JQCuUFC+9/TgGiA9RwFSi13Lmk7u4fPEp89UOxT6ZbR1qPT8S9eon4snxwR dFjQ== X-Gm-Message-State: APf1xPArdTO5D6OC/HGQgZIs20Se9TKmEGWM/8wEI0wCLS8Bd9L9K9lT tX/aZ5ew9t9k42diytReEPgXVgHu X-Received: by 10.98.36.198 with SMTP id k67mr3688525pfk.35.1518587548525; Tue, 13 Feb 2018 21:52:28 -0800 (PST) Received: from localhost ([110.70.52.190]) by smtp.gmail.com with ESMTPSA id l64sm39151469pfg.62.2018.02.13.21.52.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Feb 2018 21:52:27 -0800 (PST) Date: Wed, 14 Feb 2018 14:52:23 +0900 From: Sergey Senozhatsky To: Mike Rapoport Cc: Sergey Senozhatsky , Minchan Kim , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Sergey Senozhatsky Subject: Re: [PATCHv2 1/2] zsmalloc: introduce zs_huge_object() function Message-ID: <20180214055223.GA508@jagdpanzerIV> References: <20180207092919.19696-2-sergey.senozhatsky@gmail.com> <20180210082321.17798-1-sergey.senozhatsky@gmail.com> <20180211070539.GA13931@rapoport-lnx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180211070539.GA13931@rapoport-lnx> 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/11/18 09:05), Mike Rapoport wrote: [..] > > +/** > > + * zs_huge_object() - Test if a compressed object's size is too big for normal > > + * zspool classes and it shall be stored in a huge class. > > I think "is should be stored" is more appropriate > > > + * @sz: Size of the compressed object (in bytes). > > + * > > + * The function checks if the object's size falls into huge_class > > + * area. We must take handle size into account and test the actual > > + * size we are going to use, because zs_malloc() unconditionally > > + * adds %ZS_HANDLE_SIZE before it performs %size_class lookup. > > ^ &size_class ;-) I'm sorry, Mike. Lost in branches/versions and sent out a half baked version. -ss