Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6453506imu; Sun, 2 Dec 2018 18:44:28 -0800 (PST) X-Google-Smtp-Source: AFSGD/W/D4+Hm88GpPa6Fr66ynb76Cl0hlwaaHIW0Nw5pyCk10AFpAITDjfdB4TFa5TSbissJ7Lr X-Received: by 2002:a17:902:7896:: with SMTP id q22mr14460632pll.280.1543805068730; Sun, 02 Dec 2018 18:44:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543805068; cv=none; d=google.com; s=arc-20160816; b=aG+/l8drWCCBHLBaqAgUkmQ4SHNmK77jsXCUwvdusfCUy+RXj7K1OQH3DkEMnFHG36 gKb+KuzZCwaw+SMEu5GrehZj4L4nO99N/fM+sNa1uznPNfDx905/WCTnGrmuA/3GVh0l vm+22mJvn56ZWTMl/2akCz0HpJXFzqdfr/40XZKK1hX6vB7p+fRmZqK5BoYYBUya1dig WSssFrxbb3NqaOTlHU9rbXuLFv7EoyLxbQM8DhceaUjPwyPK8g2yRCj8Hk2SEn4xA0aE SMitYwQNYFW6yB+xpsgsF7uwRIaNcT0lU+RNlr9lmuVLCMp6FdEyBm3oZ6GBlXHYtLmE VE2A== 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; bh=ruamIwVU62U70nQ3x0f5qZ2ooxRzfwyGjKOqMHIMYrg=; b=hp2rD33syLSQZ80KbFvzkTEmbn6jCEcZ8FvrsiCimafajTBARbrbHvJFFE+WB44UYX 9KEIXmQVv3NphRjGEfo7A5yQP1HmTqIgs/eCxXyOyVL9xqLuHwx+Jz4MewDCI0eA3jgK 1Hr6t6WxfcLICpOfIMamSxF7J9zGKck+1D7FlMQFS5jbmt8eRovqHkJzr6qJ7QqkJp3S cRPOuIeS+cMKkL8onuE9aEqaU33ynsYJ+o5mKjKKS7mcINTokCKeHI8xEsHz9VB6eddB pWIPFu5VtT6b1SzXZPbmtg0Qn9A3uHSf8nqWNp2wZ+cTs2BwQuu3etYCE9f6N8S0tVlG mCqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=byDy9IwH; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 72si13151634plb.224.2018.12.02.18.44.14; Sun, 02 Dec 2018 18:44:28 -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=fail header.i=@gmail.com header.s=20161025 header.b=byDy9IwH; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725975AbeLCClz (ORCPT + 99 others); Sun, 2 Dec 2018 21:41:55 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:41264 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725795AbeLCClz (ORCPT ); Sun, 2 Dec 2018 21:41:55 -0500 Received: by mail-pf1-f193.google.com with SMTP id b7so5567026pfi.8 for ; Sun, 02 Dec 2018 18:41:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ruamIwVU62U70nQ3x0f5qZ2ooxRzfwyGjKOqMHIMYrg=; b=byDy9IwHC2D3Zi8JH8s5xaCaPbMtQSAM3a7YTuGcTbXLVtDlUZxh9vxpRe2y9zqM5q LkDIzjCbSfOy+tgyILgAlw5rUjXatV7rluSvH79sgzQCpmKnAvYiUyvsjKNZdu0qSTWJ GRNVYvXSBiMO3bs7Xiiv26l0C2dU5m73VhoHhiadfP64zjNn/I8MxxkBYbPAWBd/dwGz GH+APGqK5hZ2FxdwX9MRgiRGuVFOO/v+fxz89owvQbV+Un8d8wyTZ7qe+JeHD0g+qbve fZspVdSnksR6tyFAcAOdpGr+2S4nEEkNrQROS2o9JOKQ0cySigl/VTA9ms7v1QehJGmu WEPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=ruamIwVU62U70nQ3x0f5qZ2ooxRzfwyGjKOqMHIMYrg=; b=MBDFMCBk+JY86zNFHFmM36ZBADULsR/FBDfjtPEWJIIHK8Kx3D/foCIY0Oz/4KzfHD tOu2z1tPwuvG8nnTWHXytA1lx+ru78bX3RBO6sMlVZYAgvr/V1G6IMNckDXg/p/0Q+V5 kbeby5UIOlqCShcjcFw7M7bOhkxL39Vc4voXu2XqMjiD+hrbNTjjGzwz35Nxsqv/nHjk MXeCbphuBWj4sJaTJDqEx2OXJlqBHuF5WJWBCG/2jXCZDUmMzxVwEuPxW333YYeFSzYO 9XRMIHAa1FATgMk+G7TAQno2hzd6JRPqoxUdP14WxuRaxbLoCWJlviuKNlReHY2OvYX3 7r2w== X-Gm-Message-State: AA+aEWawm7b8Jc64xO6L5TklgvnhODnZ5o+8MlxVS9VgCy1JK/grU8cE nSZit6LznmANQMalyiSt6UM= X-Received: by 2002:a63:4384:: with SMTP id q126mr11773799pga.160.1543804911360; Sun, 02 Dec 2018 18:41:51 -0800 (PST) Received: from google.com ([2401:fa00:d:0:98f1:8b3d:1f37:3e8]) by smtp.gmail.com with ESMTPSA id l3sm17250244pga.92.2018.12.02.18.41.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 02 Dec 2018 18:41:50 -0800 (PST) Date: Mon, 3 Dec 2018 11:41:46 +0900 From: Minchan Kim To: Sergey Senozhatsky Cc: Andrew Morton , LKML , Joey Pabalinas Subject: Re: [PATCH v3 7/7] zram: writeback throttle Message-ID: <20181203024146.GA149587@google.com> References: <20181127055429.251614-1-minchan@kernel.org> <20181127055429.251614-8-minchan@kernel.org> <20181129022358.GA6379@jagdpanzerIV> <20181202231829.GA21560@google.com> <20181203023040.GA427@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181203023040.GA427@jagdpanzerIV> User-Agent: Mutt/1.10.1+60 (6df12dc1) (2018-08-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 03, 2018 at 11:30:40AM +0900, Sergey Senozhatsky wrote: > On (12/03/18 08:18), Minchan Kim wrote: > > > > Per andrew's comment: > > https://lkml.org/lkml/2018/11/27/156 > > > > I need to fix it to represent 4K always. > > Aha. > > Then we need to increase bd_writes PAGE_SIZE/4K times in writeback_store()? > > wb_count = atomic64_inc_return(&zram->stats.bd_writes); > ... > if (wb_limit != 0 && wb_count >= wb_limit) > zram->stop_writeback = true; > > bd_wb_limit is in 4K units; but in writeback_store() we alloc a full page > and write it to the backing device. So the actual number of written bytes > can be larger on systems with page_size > 4K. Right? Hey Sergey, I changed interface in recent version v4. I belive it would be more straigtforward for user. Could you review it? Thanks!