Received: by 10.223.176.5 with SMTP id f5csp278389wra; Thu, 8 Feb 2018 21:49:40 -0800 (PST) X-Google-Smtp-Source: AH8x227BsvpI1wOxyr3swuzFHaXfh3c3j2EIkqUiswSlbH8IMlAMx4Iu5PHMhVhxw9/bve1WA7rI X-Received: by 10.98.15.130 with SMTP id 2mr447844pfp.62.1518155380546; Thu, 08 Feb 2018 21:49:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518155380; cv=none; d=google.com; s=arc-20160816; b=T+uLcVFsYE0pPN+B6P3OqP3oh/Yp6Rkia4/ddRk+4eSKdt9bK9BS9jClWk0MKua9oP l+bEguaDvGkEvk3K17sYOKsddv5nPFA8Sf9hTTbQ2Zj/9UanUVWiLmRQ5dESi0nEDcqX z+1gyEtsuAvAjVetDr4lq2fMsyBps+rkABy+NhHja8fHhcYpuRVzalQivNuJRHvDn0J8 BXRBd4Y2M6I0u9rpzCe8qJFky7qWP1DVrD5mgvtEtOnq8JaL/wau/lH4MElqmHfZelur OUsYynhk7NPpOypdqxdauL0rrAdQBSqm+en+MLL1n1ZU2VZr1blMScEEZxv8BmkKk/0i Q7UA== 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=TOT2mpQWbY7zse0PThV+aOdF4pS6MU6QVfSTOORPIHc=; b=IDjJa7TQaB4DAWsL44gyi66kVB3GMrWLNuwqEiUJCQollvO6Rpzr8J/rEP+aCsS+yJ jq4BNo9mDkISQyybLiueEy1y2GGu6ebXI8izoZUIbRAM/WICAJj8rAOliMUtDLrXgijp gmLXW3a10PPIgeVXWcvehiGYw/VKhAHv8sMEzgTC/YBYVfgPOdOleUKPWZzRZuVF+OON P3OhAizM2HL6tDP7y9Jo52IIu64v4aqlFHNu0/+iQwBbtMm5xX0t33ute5ny+xikmco0 J6ohV9Cnl0Q+WBLcVD8k0Zlcl8x55bjZ7JqGd1Mbt+W8v7kYMzHNZEvpcJRtCtaDim8U edwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cDqnCYC4; 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 s70si1201353pfg.255.2018.02.08.21.49.11; Thu, 08 Feb 2018 21:49:40 -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=cDqnCYC4; 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 S1750928AbeBIFsQ (ORCPT + 99 others); Fri, 9 Feb 2018 00:48:16 -0500 Received: from mail-pl0-f43.google.com ([209.85.160.43]:39277 "EHLO mail-pl0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750789AbeBIFsO (ORCPT ); Fri, 9 Feb 2018 00:48:14 -0500 Received: by mail-pl0-f43.google.com with SMTP id o13so1001317pli.6 for ; Thu, 08 Feb 2018 21:48:14 -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=TOT2mpQWbY7zse0PThV+aOdF4pS6MU6QVfSTOORPIHc=; b=cDqnCYC4tWlICavri6lTs6VAmp8h/vF75/6jK7+6PB6UXqyVRQrmRXvAAfNyoSFTB4 pkeqY9RtX7UzWXkJSwTSyA2xJjtjPF/dvzU4VqiH70xd6D2l5nWSdCnWtf35ogstECSY 2Y0bop1xWgK4U6Aa3DAn5eChs9j4QaUupx9GTYqfy9MKUjOMrv+p8y/qqJyPCZWaXQl1 JXNAU21Omp2kSd/IsPUQHORebP2dmil96unZ86t76Gr9Py8nmhN58YxdoyiOkkGWHQR4 f6n0ymMgro+hrsvSM+EfOjfBPuu1g0mWJ+MrX0DmNbMmLlguXndZhXKHX6mPugL6aygs NUbQ== 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=TOT2mpQWbY7zse0PThV+aOdF4pS6MU6QVfSTOORPIHc=; b=lfgR73tc6ltG6FEqQXj6OO1Zb8llpA+uqIIcdVvcrMguLaDeH/VPqcTMG4xjBPA7ps EvqmLghcb0pEY7A6xE1OQ0vcg4zKrjb5j+jURn/wtKBXOxDJgIEjT/OHzjU4QIIdEomG 6bNVhNdLNkXUHYw0sF08VJf0pf4Y5uJ6/X8vSU1OFTl7rA1HWRDvqU7nlUYKYwxLLPoF 21ETP9uU/XqfrWzTstgddQvNHdb6t6gt48AyCkHscQJWtwfuc6n8PMAre3WunULhDBqh /y3IJFd3JVEbEGdKz/PvoTf54I1rQq+gTyuAYyzw9IpOmSkLyYjw2dZvargdGFFUBiZ5 hp5Q== X-Gm-Message-State: APf1xPCjaarWHqlPH+5qcvMAmjPlJSekhbQlvzVK7nwQTs3GH0uSELE2 KASWZEV0rl7q+qcAhvE/rUKAieKJ X-Received: by 2002:a17:902:28c4:: with SMTP id f62-v6mr1450506plb.31.1518155294232; Thu, 08 Feb 2018 21:48:14 -0800 (PST) Received: from localhost ([110.70.51.39]) by smtp.gmail.com with ESMTPSA id q87sm4227170pfk.71.2018.02.08.21.48.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Feb 2018 21:48:12 -0800 (PST) Date: Fri, 9 Feb 2018 14:48:10 +0900 From: Sergey Senozhatsky To: Sergey Senozhatsky Cc: Matthew Wilcox , Mike Rapoport , 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: <20180209054810.GD689@jagdpanzerIV> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180209053630.GC689@jagdpanzerIV> 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 14:36), Sergey Senozhatsky 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. > + * @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 > + * are going to use up, because zs_malloc() unconditionally adds the > + * handle size before it performs size_class lookup. > + * > + * Context: Any context. > + * > + * Return: > + * * true - The object's size is too big, it will be stored in a huge class. > + * * false - The object will be store in normal zspool classes. > + */ > --- > > looks OK? Modulo silly typos... and broken English. -ss