Received: by 10.223.176.5 with SMTP id f5csp427526wra; Wed, 7 Feb 2018 01:30:41 -0800 (PST) X-Google-Smtp-Source: AH8x22739OP4LN8mOIgyYKDgInyb+ucrHPcJh7eX3pKPaBUE45yIrB+2NHGQXHjaNP6CHFjPdrtH X-Received: by 10.98.105.199 with SMTP id e190mr5418823pfc.70.1517995841251; Wed, 07 Feb 2018 01:30:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517995841; cv=none; d=google.com; s=arc-20160816; b=GMvncmCIuyePAknAWi7VPDt4tjidCOtQEDZN9uu97NsmxBwy2VBgj32yfHI2Rjdtgt emdSzctfp71AUKHgXgaoSsd5UTPJbjWdiLEkQxw/FVJDX6lfTr3Tdtq8y9wBp4+vmVp2 W1y87ruGlJoHXj1+vwmoZ/0QQN3tVXOfq1AwZUwp6JpxsXaDswdOo9VNnwz1Lwb1pt83 k68uCO1nMDlsUv4fFWoywyfAu7zCyv9EVT9KqUt4tOjyHlRe2C1kKg6u0z6SWZ/3viPQ Fekv82fGF+7gPKPXO6C2GD6GWS65YFtgSByn++MB5xbM1tK+s4luutKTOuc3JCGiAO+e pWPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=/EcYraTgRVH67yJiVr+tkFXkfF3hY116O+TmmNYZn6U=; b=r1dLXQ5zukfB7o62xTho7nk447pPk1nP7mVXJ/zcyRytkZ/wOyeihvOHUMxKP1dQTZ m3/KV1MSmGrnL2dAfPZmVk7AeyBEMGJh/P29q38FQrqnon0kEZ5P0utUhoi/x/zJLpat aaMQeYyPuy12uQPSuBQH4aYmBpKZ6XOQvKEYEZJ0FV66mDoylhJFRUtK/kn+FRIuq1sS iyM7O+tG+P58zPX0EQFGZuHwFNmgtCsWDevYaLhvk1WD9vNlko3UVHS/jPYjOYXTFv9e 6TFj13znqdYmOB6p1Ze/8qUNlO3sF+GMZu1G+gMzqqiF80yuPo6bBvvQ4zCc6v/UJADt 77rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oTrr9Tft; 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 n11-v6si817296plg.134.2018.02.07.01.30.27; Wed, 07 Feb 2018 01:30:41 -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=oTrr9Tft; 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 S1753669AbeBGJ3c (ORCPT + 99 others); Wed, 7 Feb 2018 04:29:32 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:43206 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753398AbeBGJ3a (ORCPT ); Wed, 7 Feb 2018 04:29:30 -0500 Received: by mail-pf0-f196.google.com with SMTP id b62so82974pfk.10 for ; Wed, 07 Feb 2018 01:29:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=/EcYraTgRVH67yJiVr+tkFXkfF3hY116O+TmmNYZn6U=; b=oTrr9TftRw6y4SZgGn6AXUzGQ7xrWK4jqKoPtniufUsyExWdlNCn/5u+TwoRqNKCF2 kfDsMq5SgmbNEuJoP2HeCOoWN2JEIssKTy54gPknJhim4SX5eOQdFqlFRLZM8jiE4nsJ 9vaKkeCAJ7Fens7TjEhVu9mPfRDGRd7TSsDD6QwrX28PBa+5to2W9h3cbFnYp4kih2ex Gf+h4g8InXmF6vDdLhGV7+Me9u9nmHr1hBQIQe9gxUT0oZ4iG7hERcLhjzXrE4nV3BfW t/C1O1YZZHTJCPYNANZMPjOIcE3SWxpP7Eo+RsorPLLVCZiyd8Vukqk1Z3LXmxEXy6i9 hpBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/EcYraTgRVH67yJiVr+tkFXkfF3hY116O+TmmNYZn6U=; b=V8yshp8EaOpXZ8V0P696zbij+6pPumCPNcu1sZxvaBa4NnC2oryIOakB9gXhjLfRfs RJh2QVGBBhjyfUEzYU2azkDMbOkbxqGZByG9DA/6awRz1ayrCv5CBKSVnh75x4JI19m6 Mn7hU71pwYL2thtoF+pGvN0BAitR/rgcvO7K1JDUIafhFZgiwa4BwSEbrkh85yK/pkZt 7nvgfKhH4+RhwKUw/r1CiHBcS2CSxSzSvzDEMMLePG9eFwSOjoeA4ibHPnMdJmmq3Ghg DCxyEp7nPy8Qln9Rjd3TtJ7ahvyxtv8RoCRJ8REUsJLiVSXDJDl+ygwgzGnTnpvGXaHz BmLQ== X-Gm-Message-State: APf1xPCRGJ+WWfsIGzeoKD4GqZA2och+O8i6cyZibPhsww70idbsihQs Gz4VQmG3GF3yX/Et9D1Gqp3vxtzf X-Received: by 10.99.67.133 with SMTP id q127mr4399740pga.365.1517995770293; Wed, 07 Feb 2018 01:29:30 -0800 (PST) Received: from localhost.localdomain ([39.7.54.25]) by smtp.gmail.com with ESMTPSA id m3sm2244516pgs.90.2018.02.07.01.29.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Feb 2018 01:29:29 -0800 (PST) From: Sergey Senozhatsky X-Google-Original-From: Sergey Senozhatsky To: Minchan Kim , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Sergey Senozhatsky , Sergey Senozhatsky Subject: [PATCH 0/2] zsmalloc/zram: drop zram's max_zpage_size Date: Wed, 7 Feb 2018 18:29:17 +0900 Message-Id: <20180207092919.19696-1-sergey.senozhatsky@gmail.com> X-Mailer: git-send-email 2.16.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, ZRAM's max_zpage_size is a bad thing. It forces zsmalloc to store normal objects as huge ones, which results in bigger zsmalloc memory usage. Drop it and use actual zsmalloc huge-class value when decide if the object is huge or not. Sergey Senozhatsky (2): zsmalloc: introduce zs_huge_object() function zram: drop max_zpage_size and use zs_huge_object() drivers/block/zram/zram_drv.c | 6 +++--- drivers/block/zram/zram_drv.h | 16 ---------------- include/linux/zsmalloc.h | 2 ++ mm/zsmalloc.c | 17 +++++++++++++++++ 4 files changed, 22 insertions(+), 19 deletions(-) -- 2.16.1