Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5204884imm; Tue, 18 Sep 2018 06:05:03 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaHIQZ3twELFSEU0Qw9Y+ClkX/H99yZIoz7aFT9MMDkb7CFcRzx3rbz6Y33hm/VkfPaqC75 X-Received: by 2002:a17:902:5617:: with SMTP id h23-v6mr29703467pli.324.1537275903353; Tue, 18 Sep 2018 06:05:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537275903; cv=none; d=google.com; s=arc-20160816; b=FaHzpIpnyA/Jo1UkMnhfH+3K2FSkHDl9a73113L2xAktObxS3U5mV+OUHvbZ6zfJZI E6zWLg4RKkKk8nDH5rWq3bt4/fkNZ4e/SxTsANvvbwOFlXm1DROHqWfA6knWdDhjeygq 7nvWpdcDubP5NjdVVJmO8ztmkpfR1L/zqk2YnfLK/yYk4IIdTmagrYnW1405mq2Ejqjq XmACrYPeKjfGt2zMgPw4Z9ZaMaGNtTaEaFzg84QtyOmSIPUyGJplllIhuuTvIKw3vJ2S B5XsrjJnmRecG6A9x5wpI+Dn976uNfL61kVHr6cJFNAv5ku1GdDSmv5b2a+OlwGEHrUk o8+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=+tS9YZxmmDSveQk3vKSrKlIM7NCMw+E8TFupVrn4z34=; b=yQiBUyHzPMw0v00ZivIQbnd+ygp7YhkM7GU4z6jrSfA2c+zVHISZawzbnxGFxuKZR7 gqE+QCNPv+5xy56c2nweBxKjPuCbaFlV7JMdjJyg4PD0tcilYAd4iA3LRDDzjrZbeuvD w0xiTwja/wIhFiQOM46ii43ZLWcpHDA/EBY0wljrtp8GW4lQ5z7y/DB9Sgi18nJ28bkI XNTwGUuz7C6gIjpmmdYCE9KmBis/i5IK/JkcFwiyydP+SYoylbwt/+9b9FN7ID0xpEbN rEpkLI9wuOIj6fD5NiWzbqehedgq6w79D4qkOF78vy9iOLY+mLvKUEc/GUGcBRE6lCnb /f8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=WEM3+K0B; 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=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9-v6si17816645pgj.430.2018.09.18.06.04.20; Tue, 18 Sep 2018 06:05:03 -0700 (PDT) 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=@virtuozzo.com header.s=selector1 header.b=WEM3+K0B; 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=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729734AbeIRSgY (ORCPT + 99 others); Tue, 18 Sep 2018 14:36:24 -0400 Received: from mail-eopbgr20093.outbound.protection.outlook.com ([40.107.2.93]:10848 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726037AbeIRSgY (ORCPT ); Tue, 18 Sep 2018 14:36:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+tS9YZxmmDSveQk3vKSrKlIM7NCMw+E8TFupVrn4z34=; b=WEM3+K0Bbwn7x/XQv5S6fve0teE54/WbNhfIfVy9LNqfco+plmXaNrVrAZ9Xq9aig8t1fDkCs2lWUfuXtSQegKgieaTk/ZLGu13Yv23TMDFu0OGxr1IGjrk5GlU4TgeRzJcxUvAnMWzblbXGZuW03a97AzKzMdVrrrIqLV1ql2w= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jan.dakinevich@virtuozzo.com; Received: from work.sw.ru (185.231.240.5) by VI1PR08MB2782.eurprd08.prod.outlook.com (2603:10a6:802:19::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Tue, 18 Sep 2018 13:03:49 +0000 From: Jan Dakinevich To: Doug Ledford , Jason Gunthorpe , Yishai Hadas , Leon Romanovsky , Parav Pandit , Mark Bloch , Daniel Jurgens , Kees Cook , Kamal Heib , Bart Van Assche , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Denis Lunev , Konstantin Khorenko , Jan Dakinevich Subject: [PATCH 0/4] IB: decrease large contigous allocation Date: Tue, 18 Sep 2018 16:03:42 +0300 Message-Id: <1537275826-27247-1-git-send-email-jan.dakinevich@virtuozzo.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: VI1P18901CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:801::15) To VI1PR08MB2782.eurprd08.prod.outlook.com (2603:10a6:802:19::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 92febfdb-639f-4026-adda-08d61d672d85 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:VI1PR08MB2782; X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB2782;3:ZJHsti4S1Q/n5vtw6/8/D8Wn5RBbETv4NM5c9VohfZ4sj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BzHhWeEOJBVSLety/TENDAB6hOMXF9lbTKuraTmVhaXpQ7lthAxOkhaguNplOBoPnXvWHNxCpPvbUWlfkvTeSrczoEvLJj1kjF9AQlefc2TaF+Sz4K6aNM3zHX5T9ER14Whfzmpq/kCieCfU3qnu7xKFfj5Gc7zaDNf1najEFaRfPVLYANwsmxvnxHXbWw0Zvr1wu2zzn9bfSWdI9wJag7O+/s2ILmgBkFXerf6J+VCmbl+CcsA/SAyrV5ttgfTVQEy/aFn/DUcWMwodsYg6ddUpEN;4:tVOJAQzP5nr75Tk5jT8YHWadElN2dmJyRZx2fYjPeGcusHwZ07vw1YllIMuiV4Flc57KsKI/OLM2/5CES6jSNEtl8C7Ki2NN6UXd5eT7DICOYllJV1mkasdhbbg+ZwYgwaRJzSmZrBG+Wf1L8YsG5bV1qB6MEqH9ZawJBKZ20a75v8aBxD5y1jeOxN6SrXaUYPFeeSgOKwaB0bJ21/KIyheBQC2t1yzi1XGyjCQNWHxfUXedCYfyN/NfYOcNZeymGRVB+ZQ1bn0Hm7IpC0dHcQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699050);SRVR:VI1PR08MB2782;BCL:0;PCL:0;RULEID:;SRVR:VI1PR08MB2782; X-Forefront-PRVS: 0799B1B2D7 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(396003)(346002)(366004)(136003)(39850400004)(376002)(189003)(199004)(3846002)(486006)(16526019)(44832011)(7736002)(26005)(68736007)(39060400002)(6116002)(54906003)(186003)(53416004)(81166006)(305945005)(16586007)(7416002)(107886003)(66066001)(2616005)(106356001)(956004)(8676002)(50466002)(8936002)(478600001)(105586002)(476003)(110136005)(81156014)(5660300001)(6486002)(6512007)(14444005)(69596002)(97736004)(4326008)(25786009)(47776003)(52116002)(316002)(2906002)(50226002)(386003)(6506007)(48376002)(36756003)(6666003)(86362001)(51416003)(53936002)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR08MB2782;H:work.sw.ru;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;VI1PR08MB2782;23:ixqet6Xy33mexOpayV/lIAlF0nBIZE6ftjMRRVbP7?= =?us-ascii?Q?uXtzGM0O0LCY1Z/f/4umy4s17Ea5h5eRQ/prA+oZr8+R5rmZwhTR2CjR49ua?= =?us-ascii?Q?2ZZvtY3hKLukX/tIqu/39Mm5/AgBRZY7W/lRxpacDSpg8NR2fRzsuGMtTSqp?= =?us-ascii?Q?JUFIPMAPV0NH622wDX79FqyMEB+SynjE0MzOh6waZPFOIUuUDqsptZKauJ6J?= =?us-ascii?Q?/N/Mf+yXhQwnNzfurcTpHMonI3Tm4vty+jLpt8kAhehzl3qBcOTSDpO8dgGv?= =?us-ascii?Q?IW9MbCoU9nBBPOxer/1lA/ajOtj7RqakocyJfEgHn+GqYio4oI266sxYn/Cu?= =?us-ascii?Q?LUiuTEh1bEmEjdSWz8xbSnnjDQqtKmJbnEsQkFdtLaL28lH6c4NdMQg4ushM?= =?us-ascii?Q?sA8GDy/vIQ57ftmQE2kwXG2iD9WIRvm/6DUuOqccYD8zY/YYqPI9ioJZgqt8?= =?us-ascii?Q?1pquTkkgZoT+hp33x8QVaMw8YMd35EWiwCCbT0NluXwRj8zYjLIkPW0xZPQs?= =?us-ascii?Q?CrI8wwccIarCmSO0CFquiaXgN8pwSOhOEbR9TTfPGWlIgm9E/SNtfn9+jV1/?= =?us-ascii?Q?jYfxvHqP4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re8IiREmAM2Pjm0+tCV2HoLFWiaLGJRVc2LnnN6IYoEfjWk+FSpiD9V9RcPI+QTVBkWEqHNGp2l299s5Ks1z0DO SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB2782;20:cT2ntYOFd5LK+l+3ZkCdxExOmW3z8cJzLANdn3TkAW+FevuMjAgd/rGRghe/T2zadqsKv5RbXsQIykx9D7YpGeyAGuZi7klD3QliffPDw9ywTX6chiySHXFZhT6XsszgpDqIipwgqaeVE927EfknDsixzA21tF5x/C0M2u1wuQQ= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2018 13:03:49.2076 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 92febfdb-639f-4026-adda-08d61d672d85 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2782 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The size of mlx4_ib_device became too large to be allocated as whole contigous block of memory. Currently it takes about 55K. On architecture with 4K page it means 3rd order. This patch series makes an attempt to split mlx4_ib_device into several parts and allocate them with less expensive kvzalloc Jan Dakinevich (4): IB/core: introduce ->release() callback IB/mlx4: move iboe field aside from mlx4_ib_dev IB/mlx4: move pkeys field aside from mlx4_ib_dev IB/mlx4: move sriov field aside from mlx4_ib_dev drivers/infiniband/core/device.c | 2 + drivers/infiniband/hw/mlx4/alias_GUID.c | 192 ++++++++++++++++---------------- drivers/infiniband/hw/mlx4/cm.c | 32 +++--- drivers/infiniband/hw/mlx4/mad.c | 98 ++++++++-------- drivers/infiniband/hw/mlx4/main.c | 93 ++++++++++------ drivers/infiniband/hw/mlx4/mcg.c | 4 +- drivers/infiniband/hw/mlx4/mlx4_ib.h | 8 +- drivers/infiniband/hw/mlx4/qp.c | 8 +- drivers/infiniband/hw/mlx4/sysfs.c | 40 +++---- include/rdma/ib_verbs.h | 2 + 10 files changed, 256 insertions(+), 223 deletions(-) -- 2.1.4