Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp922431imm; Wed, 26 Sep 2018 08:50:29 -0700 (PDT) X-Google-Smtp-Source: ACcGV62YmZMCe+FOST7JnuotVbbpXEdy9Vo8dHJitWvdPUfxk6FLyuquoQzIDvFRz7FFCXU2e96x X-Received: by 2002:a17:902:8a4:: with SMTP id 33-v6mr6713564pll.65.1537977028971; Wed, 26 Sep 2018 08:50:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537977028; cv=none; d=google.com; s=arc-20160816; b=sVdxyZiho+SQ2rWEQTWZZVplODMJY0r2fbQ3RrwBysJW++T8UDtjpv+sBrIibzPgHN 9Zg8RTx9J2kKIzGWHm2aretAmFZ4nnZmsFKGAZAhwEXvMVyFT3xtDkBIqgnfCcvHlN+4 gWLOj3zg9/B+zJnQT3PrzktP6VJu2Cbg5YWLKhpQCwUUAxSyTB+YYFT46C6FSC1NDYNV zhneAsmiXxye8fWsc8LaGkBT/h4KGBdgbsOukVr7NrewKQEirU+G9PZHGo50KT1OCuOJ O678uITTLpCsZQoZzNhiEzOpp1l7LrmNasnhmLd4RkUkrryPa/Z8lYiKg1DeA42g+3dn pXMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=n5GFhhxGNgVj+zkCtytglL1MfS2sqkOpcSZg1ewVpLg=; b=UoFfNzUoEZD9hPKfONhOEvpeB/m2nQF9JIXUolZxviefQFTEybq2rzhZvLjC6pcmN4 ocRBatks8bOQXkNaCCOUAH796P0+fzlp5YDZZHbNq1a0I2ZzxBkteRS/jd1W0M5YcSbl WuvCSzo+MKg9VpOuHNWH3JRQc60ZkefeEHl/cVJsdVT4ZLR5UB3wwG3bKUOhiX78aJ+m 24NlhUisF0h+VKVI7HrO4LRwdyfK6t1OWEYyvHX7cC0am6HY24dTBu1Hoe9k6qAMr3bz rIM00UmpZygIadtQoJ0aP4DxPFNLl/pmctqXLPcojg0wpenV5w6DdoQPXUKH0a2vHlQb jH4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=fTFT41hp; 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 a20-v6si5502064pgi.184.2018.09.26.08.50.13; Wed, 26 Sep 2018 08:50:28 -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=fTFT41hp; 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 S1728351AbeIZWBy (ORCPT + 99 others); Wed, 26 Sep 2018 18:01:54 -0400 Received: from mail-eopbgr80122.outbound.protection.outlook.com ([40.107.8.122]:50760 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727285AbeIZWBx (ORCPT ); Wed, 26 Sep 2018 18:01:53 -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=n5GFhhxGNgVj+zkCtytglL1MfS2sqkOpcSZg1ewVpLg=; b=fTFT41hpKSqXEYO9xHngtMwN/6JjC0eLSRA61qg08JaD0DlNVUDGLfkaxyYY7OXKwqAFoGtR3bQVdDQRQX644W6QTGqD+aoMpuaz21GTQnmSVcfP5c6PiHa/JRTY7R3gmWgFivOKE2Em8dGx7YvYtN80gobhDi9BpZBufwSlUWM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jan.dakinevich@virtuozzo.com; Received: from localhost (185.231.240.5) by HE1PR08MB2780.eurprd08.prod.outlook.com (2603:10a6:7:34::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.22; Wed, 26 Sep 2018 15:48:13 +0000 Date: Wed, 26 Sep 2018 18:48:09 +0300 From: Jan Dakinevich To: Jason Gunthorpe Cc: Doug Ledford , 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, Denis Lunev , Konstantin Khorenko Subject: Re: [PATCH 0/4] IB: decrease large contigous allocation Message-ID: <20180926184809.5d37cdb7@virtuozzo.com> In-Reply-To: <20180918144623.GI11367@ziepe.ca> References: <1537275826-27247-1-git-send-email-jan.dakinevich@virtuozzo.com> <20180918144623.GI11367@ziepe.ca> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: AM5PR0201CA0011.eurprd02.prod.outlook.com (2603:10a6:203:3d::21) To HE1PR08MB2780.eurprd08.prod.outlook.com (2603:10a6:7:34::32) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6fa9a296-3e64-48bf-127c-08d623c778a6 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:HE1PR08MB2780; X-Microsoft-Exchange-Diagnostics: 1;HE1PR08MB2780;3:Ilbqnwg1SRpC9FSAKPnEgEGKuDAL5C+6IZQ5bWbh3TEbvi0hxa7Ql53Lywu3wA4AbLzcs702uSoI9jWEWpxWs0dZ2rFbzCAlsrOS2drCkHJVMJd90ur3VVPtpnYc8k9xO1qzsZPF/RGSvm5HuE1Sqvbpc/Li13fwbiBZ9xn5DJ2Dw0NeWmvggLqgfSl3OJfa/n7cB3spavVnVwTU2OXRzrWq4rmfAiWCAa7NgED4OzI6yi5tkVwBMnHJVzFymqUV;25:pYOxj2etrEMC8Dm094vckGyYwXOQ/ajEPlYfoHBvFntWMrIzrshIGT2XZje4htQynGcEoctqovUzrmyH8I3MhqRC9XZKB0+Ngh0Q+Z/dXXlguwmpZIH97J7b+vkQ3G2ywxCGqQZTq6+2t0JFa2n4JsJzSI65PnaTiLlDsvuvrvIMd7Flm8zhrPnyaU3/HrU4MkIC0bus+GRe13dlq0DBNVeaYgJREYN9I38DccJ/cKdsGxfBaHziPnrJQz5aTiMiWG2R3LQQhDRolDvun+Ekh6D3GeUdQdY6w5pEAfO11L3pZDqdLC7APX8Y9TlFmy1iH4MsqGjwcPMpxeYM4a9EVA==;31:U/WLND1o1JsRhyOad9psfyzN09WtdAsRBcyObKSgqk48dFH4yeN59MxOOaFLYhC+yoIv4IsEU7CXHxmskVb3OX/QJ76nJ9qECK5REbo5NP3o6R57hVMpsT1y3qJsY23TXbG6C9cGeDjydNgYrGVhB1I5buR5wFymdajMRQFUCv9Sumdd1XQIPICMhnjALreGgvCJWqbB1I0Q3IscszeuAIuI3KKc1y+I7JqwNr9cOrc= X-MS-TrafficTypeDiagnostic: HE1PR08MB2780: X-Microsoft-Exchange-Diagnostics: 1;HE1PR08MB2780;20:2zAzo7Eraw39dH3doxPxwEWsGZu4MuDi5iOn5HbBJF8CevlwLe+gve8Z/XwbnZ2WUjk61KAdLPs8TEtAhGTOuos6F/PuVYF4qU/aSI6Ax7Tt9iBymftyPvfX4fLustKUdHs1fk8cd5Zzzt1XE2F3CIacpnxqrrYd6F0inkOwWLiBGqAY9/EioT/KI8yB54QvDejF2dj45qpSmEe3KCwRkqW5wSDBtDlXbapnnq/WJfjjKSsgU1xASSX2yOw4NLbu/9J36uz+VGbkVG3epFzWrDFbTiqxVL8NHhtArmgyJoeeaDhuANHGzA5E1YW+Sxy/3Hl8dVALgU78gh09lAPPcYMujBeyRIMKMvK8ugvs9iS9723Ni59KaFDq/KvdGFGx3bjoNGVHVdCrfjQ4so3HeGRTPLsyf2tvMV00M2HFi2O/mCf09l+WtxGnOW8TI1XXlCywipoLIDVWT++f/pChWUsE0iKiOjyyc5zTzT5oyK9F12tm2/+8WsmovbsdhhLA;4:mOAnVm14EUuJyaAZlgJyVg9FY00eXhgXsom7aRGc4ULCX0mPL7ikcLxP/SsOnxrE4KiRmeHLgUcnlPHyVEi23zb5CYKJrMPx3cgGzoaqQ8lZOBosrlMYxiidVI5+DO/fnueC0eb2z1e2LKdTzvQ2+k0wJqLAEXA6DDHuijQmlDlWTRdOWwSoa9mJSXIVztPpRjhrLGux/G9sjEhf93SY8/S80vptoJRYOMJgjKWKHOtLugAwTWIgQzdvVoC0mXiFtBRsagCTQ7086eKHwIsJxppgHJdRezW8qIQQ3Fe22TmvAEmjzPk8cifP4q3SLAPq X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089); 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)(149066)(150057)(6041310)(20161123560045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699051);SRVR:HE1PR08MB2780;BCL:0;PCL:0;RULEID:;SRVR:HE1PR08MB2780; X-Forefront-PRVS: 08076ABC99 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(376002)(346002)(136003)(39850400004)(366004)(396003)(189003)(199004)(25786009)(8936002)(305945005)(44832011)(36756003)(86362001)(6486002)(446003)(105586002)(76176011)(476003)(11346002)(6666003)(14444005)(106356001)(26005)(186003)(7736002)(6496006)(386003)(2616005)(50466002)(81156014)(956004)(50226002)(229853002)(7416002)(52116002)(4326008)(81166006)(486006)(5660300001)(6116002)(3846002)(16526019)(66066001)(53936002)(8676002)(54906003)(478600001)(39060400002)(1076002)(23726003)(107886003)(47776003)(68736007)(316002)(6916009)(6246003)(97736004)(76506005)(2906002)(230700001)(34290500001)(39210200001);DIR:OUT;SFP:1102;SCL:1;SRVR:HE1PR08MB2780;H:localhost;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;HE1PR08MB2780;23:fJ1VKykOz70NZfo5mwFbblsp5YZVYv/aBRfsw+gHS?= =?us-ascii?Q?0uoi5+KUnghbdFJP+74fNCjKhImJ69ecQH/GjxFC6hvQKCWOEU5jt5zIPchC?= =?us-ascii?Q?2rmE4Cs9mPdZ6KUxvHf4KXSdLK7oiaZY+FfxLpigYj87rn+WQ82DRmK6dUZL?= =?us-ascii?Q?Z2cqZ6qoopJTZ/Vn+bNFU5NIUcJlu9FMnzCqQyFALzeF9Lsgs0C8M35y0m1u?= =?us-ascii?Q?j68BIs13LbXtpmaGANpVf8SgaL0GS6wniZmnNmt845HKstWoJCNXUKjNG2r+?= =?us-ascii?Q?0njDB7CKIQgBoqvQJJRWFSBUUW6jHkIsvG+MuS5b9jqqsOsAA6v4O139y7gf?= =?us-ascii?Q?mO3VrFFGNgBTr87vMqu31Ccbj+OVcL5vHn1ryx7ycSK4FDBTI8bM+NHysG/L?= =?us-ascii?Q?pcKcn/T7CtzhmklIW7H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sYx/g==;5:dN6/Uz8/avmrdCK3SOXxWu4UO19SeJZyF3VIG2RqGaFKEwyVhcCmDoNZviu/V7JSEHxdWdCZ7tejSI0acAn27wHqMbxAbuo6vesI8uSoLuMXlyPbrthV9vi/wJM4dp0xanzcUEoTuvEB/Cr2mYqZ5aGH8MP5rJM1bDDZlVH7cX0=;7:td9TCs/claWrE2WAuX+6Ar/CVhVGgwjPWKuBzchyydLFYoWG0XFMNHnfqufRfHDV681YKYOI0Wp4klprtZmkp4yBr9F9l+/5zSkZq5U9zyb5zXh3dYwXqYYJbHfn2iVL+29USagwrEBCrDNlVNKko0JFDanbVpiUakWg0Owkwme7v2L/qbA7AKNz0E8bRP2R4GAqbtP3xIpVyYkBXlYrD7Nyf85F2S+AcoGPaoEBG903glCW1z87v7t4ok1Y5NY/ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;HE1PR08MB2780;20:jt7De20IswqfIix6n1yxtLN0LMCYGCNb76wqKuB6mjaKHKCdCILlubkxYz1qMk8bpapQvvzXXAxGRHS7sHJzCk7N1E+AbkaQ8gql8qJJdRC0y03sAuwUW7Tsev1Ie8jedW4PdX5riEny4QI3rVAFQ37lx6I+uwFifyUNpCM9akI= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2018 15:48:13.5667 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6fa9a296-3e64-48bf-127c-08d623c778a6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR08MB2780 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Sep 2018 08:46:23 -0600 Jason Gunthorpe wrote: > On Tue, Sep 18, 2018 at 04:03:42PM +0300, Jan Dakinevich wrote: > > 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 > > Why split it up? Any reason not to just allocate the whole thing with > kvzalloc? > To allocate whole ib_device with kvmalloc I will need replace kzalloc() by kvzalloc() in ib_alloc_device() and then review allocation, to make sure that no one uses this memory for DMA. Although, I could introduce new ib_*alloc_device allocator for these needs... > Jason -- Best regards Jan Dakinevich