Received: by 10.223.176.5 with SMTP id f5csp618524wra; Fri, 9 Feb 2018 04:35:44 -0800 (PST) X-Google-Smtp-Source: AH8x227QgnFCFNqHeISBnG7Tgv6OFuC3RBxL0whlwQnNV16RtIST//qrPJmyKwJOcZaIoDjQ2yWg X-Received: by 2002:a17:902:868f:: with SMTP id g15-v6mr2489369plo.137.1518179744390; Fri, 09 Feb 2018 04:35:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518179744; cv=none; d=google.com; s=arc-20160816; b=mF8gw6OoRV5UAMYWcTqn+GmP8blpkP0HROMTHXmlE3QM/Y8JxJHirXUfFN0pkee4M4 Clcme1qM6G3/fbBXFeHyFPmfYYkOan2LJ0KMyzMZaTsRCmMEYplvh+FomtQSP0ewq1vJ l3buySlnbqbuhOeynOrfjY46tbpxX8mos2rX4H8xLU9SgrpUNMxWVhEjeIxTI/3zTNf/ k2q4TKpRNdczecjwYsKDf+9Qxee4JZHn2PZl/si859xrFNhkxtyAIhnDG/h8YPpvPQkB 8ddjgO/fHbs0b9dWxxkbQ64upSETE7+sfme7Tgg3i820MdziHwayXiPvtUsriuWVYhQ7 eL4Q== 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=qg4UofIy68n1fQli8jAIwg1MSPUFlfxaLthzChjMdhg=; b=jnFWTEfgXqkw1R7sbqGdO7q2LZyfJFj1yVkyJB3l/4s0kWlYOXouXCMxCBNHalF3wd nu45fhDzgmEJgqWZ12L+TxmBBBilL2T9zPEJcaAyLPm6FdbownNFbI0gFzqqY72XU2zU m9KuKNKoR2Y4kWY/MOGhDw1+GLFDzjmGxOdYrzJlZGqt5XPuQZJh+G4/cO4sS3HJLzw9 UxILzRZK9+OjBR5scECi1ykzrzrRLCsgK7Z2MkPIsE/+YffSkz7QoZRVXoD1hQ3UbM6e 0erlu9qM4jcOhfAyH4JHQ4jhTX8Mn01YiXe3O31uFkOpZsS52ApG6jE7kBeucTcVqZ7N DGhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=F2XwjWjV; 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 w31-v6si1602pla.402.2018.02.09.04.35.29; Fri, 09 Feb 2018 04:35:44 -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=F2XwjWjV; 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 S1751034AbeBIMev (ORCPT + 99 others); Fri, 9 Feb 2018 07:34:51 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36722 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750863AbeBIMeu (ORCPT ); Fri, 9 Feb 2018 07:34:50 -0500 Received: by mail-pg0-f67.google.com with SMTP id j9so2458975pgv.3 for ; Fri, 09 Feb 2018 04:34:50 -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=qg4UofIy68n1fQli8jAIwg1MSPUFlfxaLthzChjMdhg=; b=F2XwjWjVcDsTIpjtQP8LbJQ+F2UMPmeSV2NC8nsc/UZAbmaMCppcxlCROV+6a9QzQ9 vYWceV0MR26UOOolS9h/8lXuKx8xG/piqShI2VzLfIxiV+It78KR0ZtdYihxgjMscYAj 5ohW4w9DMPPFJaBZ2vJ5TOQEAJN5zn/V0y6+7VSHdR8uHrroMX9NHRZqgW8F5O3f/4ew En6tSirw1gY5kxJ6IPKYwcjOseb+oL150wWTNIEgWn/nZdLuNuGkXLJ9BvLe/1WTRHf8 6un1Z0+4a4P1VgAvKOu4B7o9UZP7PpV45IvF4jnakCm8ThdtOpc0fuJN6dPzo94Q3gvO WtAQ== 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=qg4UofIy68n1fQli8jAIwg1MSPUFlfxaLthzChjMdhg=; b=REyyG8kdqYA+aaJxMDVZx4RlcYi4XUhp2izHgn3Hkg6iv5SU8BZH6yRl9LJ1SMwa98 RBDdiVPifDawgksSMH6qG+sdi0xEYnziIgiSq6OuWqpssrlp81vTZX7dh9mIHhOWx6u2 XffmXe/CbScfYdRG3L6hbajXnsdaEUDKDGW2+P4pnY+aF29YKt9v3Gc4UE3mcrBpnlfn S3cSu55VIgGv+PiwmWJmT3DN2g5GYL0pYWZ01wJkjRB3NSpjOHzwL1Xm3Z2JTdmRxy+V 12vI9GTCCf3uTfWFkTmQgKZg+7Jsgmb9DYj+xXGVsSX8HqvJUusmPVcYQEGZFm/gzRbo oa7g== X-Gm-Message-State: APf1xPBRqwmr98sng79m9lt2jopZsvkZpvMd3kHvwbPBH2ULz1P4Tp77 9IJEf+jpZt6JvtO8Cl5JLBI= X-Received: by 10.98.157.93 with SMTP id i90mr2769864pfd.58.1518179690095; Fri, 09 Feb 2018 04:34:50 -0800 (PST) Received: from localhost ([121.137.63.184]) by smtp.gmail.com with ESMTPSA id q2sm4263247pgf.10.2018.02.09.04.34.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Feb 2018 04:34:48 -0800 (PST) Date: Fri, 9 Feb 2018 21:34:46 +0900 From: Sergey Senozhatsky To: Mike Rapoport Cc: Sergey Senozhatsky , Matthew Wilcox , Minchan Kim , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Sergey Senozhatsky Subject: Re: [PATCH 1/2] zsmalloc: introduce zs_huge_object() function Message-ID: <20180209123446.GB485@tigerII.localdomain> References: <20180207092919.19696-1-sergey.senozhatsky@gmail.com> <20180207092919.19696-2-sergey.senozhatsky@gmail.com> <20180208163006.GB17354@rapoport-lnx> <20180209025520.GA3423@jagdpanzerIV> <20180209041046.GB23828@bombadil.infradead.org> <20180209053630.GC689@jagdpanzerIV> <20180209111102.GB2044@rapoport-lnx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180209111102.GB2044@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/09/18 13:11), Mike Rapoport wrote: [..] > > +/** > > + * zs_huge_object() - Test if a compressed object's size is too big for normal > > + * zspool classes and it will be stored in a huge class. > > Maybe "it should be stored ..."? Agreed. > > + * @sz: Size in bytes of the compressed object. > > + * > > + * The functions checks if the object's size falls into huge_class area. > > + * We must take ZS_HANDLE_SIZE into account and test the actual size we > > ^ %ZS_HANDLE_SIZE Indeed. ``%CONST`` > > + * are going to use up, because zs_malloc() unconditionally adds the > > I think 's/use up/use/' here Agreed. > > + * handle size before it performs size_class lookup. > > ^ &size_class OK. ``&struct name`` Thanks for reviewing it! -ss