Received: by 10.223.176.5 with SMTP id f5csp537384wra; Fri, 9 Feb 2018 03:12:06 -0800 (PST) X-Google-Smtp-Source: AH8x224NzbvKspoch08Pu2Zw0VbsXoOZ2t94kVSz1+UNL0yeU3A6wg6I/z3DUvBOSKwNWoiSJbm5 X-Received: by 10.101.98.193 with SMTP id m1mr2060068pgv.174.1518174726494; Fri, 09 Feb 2018 03:12:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518174726; cv=none; d=google.com; s=arc-20160816; b=eIECk7VoQYRfBVbWw3gMMX8aArQZWz713RhNBzGoFGJK5zk7f2mUBJ/2EZUS3cTAzQ z8ag9fC8/L7fv+TROrN6zUvBCu4CbTyoCdJaOCmU+cwSdw7sHjacjSucL2MZt/QBTl66 7AN+CJ0AdP+IbMZXu2DSi3Z/V5g+h94jI0CLCVtSCHdoeb4D3k4B6/PREMFPCBSb7cZ1 2kO36UdrEEbvXTlnPAemIcvVLk82DRaMmJHcgH2kZENucQiYFQwiTbQkUQHY2IydzycJ wJzPt2iZr4i+W+sZkNiMW5cqFWuTPCDPYj529hICiTGXjcZheYv2ADOLE/Jd6K3NyWc1 meSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date :arc-authentication-results; bh=ydZgGMk9erx2w1dt0DguU2HfukhIur6E/oo8CSpOxCY=; b=fvBcXuasVoVskrmQNwUNBkT8xv9x/JuFWSOVB4+2eW0KarvkCnG2fJ+JoCN2Mqj3dH tYrIhuJtMGhGRNpDhOg4ysalVVeh4tdga9sZDyMGkR0F1XMGODrYMCf6qNIl76ZB+bRe 73tvG6mH5TbL2B0hhTAhOECRRj5u/twb15t0uIXMRy0mzv7Cm6xUUvF/L5FEj6HkOL8C D0HY0N2OCOjuEytSZk+xOn/4VZ9sBTUNgwNpILq7RdVDleeNRH2sNrqAHCf4tsmthXgL ai84n10eDhUQHYnjJqYSwhSabb+u77+tpXv/7rDUjEMkU28G1g7DwcpyL+f4JorKemzU If5A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v2-v6si1409981plo.525.2018.02.09.03.11.51; Fri, 09 Feb 2018 03:12:06 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751304AbeBILLP (ORCPT + 99 others); Fri, 9 Feb 2018 06:11:15 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52990 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750970AbeBILLN (ORCPT ); Fri, 9 Feb 2018 06:11:13 -0500 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w19B9WAB027314 for ; Fri, 9 Feb 2018 06:11:13 -0500 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0b-001b2d01.pphosted.com with ESMTP id 2g1a2js6un-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 09 Feb 2018 06:11:12 -0500 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 9 Feb 2018 11:11:11 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 9 Feb 2018 11:11:07 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w19BB7S850004170; Fri, 9 Feb 2018 11:11:07 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AC233A4059; Fri, 9 Feb 2018 11:04:30 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C14CCA4040; Fri, 9 Feb 2018 11:04:29 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.204.101]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Fri, 9 Feb 2018 11:04:29 +0000 (GMT) Date: Fri, 9 Feb 2018 13:11:03 +0200 From: Mike Rapoport To: Sergey Senozhatsky Cc: 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 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.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 18020911-0016-0000-0000-000005211F71 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18020911-0017-0000-0000-0000285DDC37 Message-Id: <20180209111102.GB2044@rapoport-lnx> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-09_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802090143 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 09, 2018 at 02:36:30PM +0900, Sergey Senozhatsky wrote: > On (02/08/18 20:10), Matthew Wilcox wrote: > [..] > > Examples:: > > > > * Context: Any context. > > * Context: Any context. Takes and releases the RCU lock. > > * Context: Any context. Expects to be held by caller. > > * Context: Process context. May sleep if @gfp flags permit. > > * Context: Process context. Takes and releases . > > * Context: Softirq or process context. Takes and releases , BH-safe. > > * Context: Interrupt context. > > I assume that spelling serves as a placeholder and should be > replaced with a lock name in a real comment. E.g. > > Takes and releases audit_cmd_mutex. > > or should it actually be > > Takes and releases . > > > > > So below is zs_huge_object() documentation I came up with: > > --- > > +/** > + * 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 ..."? > + * @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 > + * are going to use up, because zs_malloc() unconditionally adds the I think 's/use up/use/' here > + * handle size before it performs size_class lookup. ^ &size_class > + * > + * 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? > > -ss > -- Sincerely yours, Mike.