Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp303180imu; Mon, 26 Nov 2018 21:56:55 -0800 (PST) X-Google-Smtp-Source: AJdET5fpM0EKAK2Q4Ys3M+07zEWGOksNEfinqMp1LB25IMJ88o4ffWynvxcB/q+kFkhhSa0bTMqO X-Received: by 2002:a62:6f88:: with SMTP id k130mr31160114pfc.234.1543298215701; Mon, 26 Nov 2018 21:56:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543298215; cv=none; d=google.com; s=arc-20160816; b=SRf81r9gC+2xCEuAGC9dalT06tGuT36LnHS+DxhKc9CX0Ji5/Ldw/7RZlgcCimr6cM qhqRdUJYpMexQWJm02KdxU8RXmM2/0F0xTxAM0KeIPRGhkk5vRdy0ReG03em1DPDfiBV QDLtRC366U2nBjxl8dIHwGcEHyAIuDX0PymKftkvlENKN4PJrVpnd2APQK8uDnspRui5 u/wAKrTixSRuyPcfkvqPSIyIPQ8sBxuqTVM0+3dsrSYu/DBZqMVjdc6ZLq80STyz4l/t sSfheSD1wxqZdRho6mmTz1InsBWw7nERAFJy7RdATI1CwUfX+h3X8KV/IU2JPdyilZh7 8Q3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=soKMUk1qQSKl5Q75m4L8eHM47lAJ7OKo8kCDNdc+vLo=; b=aFrNs6b7HfsqYos6kUEqsykuvixyPc6jfb0LIQgzbkqsbCXhIxUo9LH+4oRi68LEZQ 9BnzHdQnR6xB7gNMvlRhMJBzK8do/Gig80b+XOcMRLuHcuQiC2bFOn1GtRs0X+k8iBcm o5343gWHxIRo0iZ1CmB2r10Cw/VmYZnm6VuaBq6iGoV7dWza5XBxaGXV6Ba+27wiJdKQ Gx0RXD0QzorVR/9B01unddyu54fZt2JJfv/yD1UYUhAzWiaxf1dr4zDbWXVA/4HN8bNW Lf1AzTAHkHQiP/xA7P/6LNgaShGNSzZdo1mddGuUeZkdl17Uu+N6m0MkLjWxAXOdfOlo Knyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=aiEEqbx5; 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 n28si3108646pfb.88.2018.11.26.21.56.40; Mon, 26 Nov 2018 21:56:55 -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=aiEEqbx5; 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 S1727537AbeK0QwO (ORCPT + 99 others); Tue, 27 Nov 2018 11:52:14 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:45299 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726363AbeK0QwO (ORCPT ); Tue, 27 Nov 2018 11:52:14 -0500 Received: by mail-pf1-f194.google.com with SMTP id g62so7798522pfd.12 for ; Mon, 26 Nov 2018 21:55:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=soKMUk1qQSKl5Q75m4L8eHM47lAJ7OKo8kCDNdc+vLo=; b=aiEEqbx5HM9sga+9Ewi2ZRY2iaX+XTaoH4p1nCr3D0rRXXD5RHGw3OH5q3UsxPPqrz 5j/QVDDYgpn9PYBpFxp1tWYiUOK7kRUz99Xw2dbmbK6Uhq+G8L99dhC6s2kiddauUfKA m7qZ2bob26LbhOJqCg9+yi4gNqAsWLLwfHlbxUQSDodrEE2ya+e9GdFFObscpb0OihD7 f3+Xp2m1RF/q6Y77brmatBvFOvXwcMc6L/dUVPcy7J1dac8Lb7ubgZWPz3JJXiNnVkJd z8moq4oGSs9+nyCaGRLJm7NBBvZTndwFKgy8RcKOvaWE0neqncPd9FkAzfeuhlDLcPFj RD4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=soKMUk1qQSKl5Q75m4L8eHM47lAJ7OKo8kCDNdc+vLo=; b=fmqywl3YQtrFruNpPRP4CfKDSgKXOk5vEDO5/AEWWofyU5AsLgM10rwEfGrbitBIw1 6MyNiLPSpd+MjXVGXAPhepGyBGCMXSyG9qbeOoMtFn9LKukV+l+ZXO2a+rt1OYM0+zPU V0+bszow5gnoaIMg//XJqcwWBXRWkQKYDQJvKZI/FaCOaGoC9cuIZs6Ib6FT8VMqGlm3 wsHsxtC9gaMpu5DJV2JHRPzKAVJvFgI6WeQV8/l+4G8CILA5wm76RcRKg9fHtruwFVTI ZmLi+LsfcpDTcXQ05/E7PbuzD1CKOeoV7hjKOixBZ5AxOMSZSyZWK65S2vnLH4N/yVOE GHNA== X-Gm-Message-State: AGRZ1gJ+kpZFwErTIahP/LsiS9nhJFT4FB44UMhwDk6jdfd1Ae9fGJiO Ev9PG6dM9MfnBLkMioVvQNY= X-Received: by 2002:a62:2781:: with SMTP id n123mr31980944pfn.138.1543298129395; Mon, 26 Nov 2018 21:55:29 -0800 (PST) Received: from bbox-2.seo.corp.google.com ([2401:fa00:d:0:98f1:8b3d:1f37:3e8]) by smtp.gmail.com with ESMTPSA id f32sm2580203pgf.80.2018.11.26.21.55.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 21:55:28 -0800 (PST) From: Minchan Kim To: Andrew Morton Cc: LKML , Sergey Senozhatsky , Joey Pabalinas , Minchan Kim Subject: [PATCH v3 0/7] zram idle page writeback Date: Tue, 27 Nov 2018 14:54:22 +0900 Message-Id: <20181127055429.251614-1-minchan@kernel.org> X-Mailer: git-send-email 2.20.0.rc0.387.gc7a69e6b6c-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Inherently, swap device has many idle pages which are rare touched since it was allocated. It is never problem if we use storage device as swap. However, it's just waste for zram-swap. This patchset supports zram idle page writeback feature. * Admin can define what is idle page "no access since X time ago" * Admin can define when zram should writeback them * Admin can define when zram should stop writeback to prevent wearout Detail is on each patch's description. Below first two patches are -stable material so it could go first separately with others in this series. zram: fix lockdep warning of free block handling zram: fix double free backing device * from v2 - use strscpy instead of strlcpy - Joey Pabalinas - remove irqlock for bitmap op - akpm - don't use page as stat unit - akpm * from v1 - add fix dobule free backing device - minchan - change writeback/idle interface - minchan - remove direct incompressible page writeback - sergey Minchan Kim (7): zram: fix lockdep warning of free block handling zram: fix double free backing device zram: refactoring flags and writeback stuff zram: introduce ZRAM_IDLE flag zram: support idle/huge page writeback zram: add bd_stat statistics zram: writeback throttle Documentation/ABI/testing/sysfs-block-zram | 32 ++ Documentation/blockdev/zram.txt | 51 ++- drivers/block/zram/Kconfig | 5 +- drivers/block/zram/zram_drv.c | 501 +++++++++++++++------ drivers/block/zram/zram_drv.h | 19 +- 5 files changed, 446 insertions(+), 162 deletions(-) -- 2.20.0.rc0.387.gc7a69e6b6c-goog