Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp916770imm; Wed, 26 Sep 2018 08:44:49 -0700 (PDT) X-Google-Smtp-Source: ACcGV62EKSoAHZYxXcd/XDzsHJ4dj/+T0j2VNklBzZdH/vSZoU0ctiUQm88kfZisGzq5/f4Mqi1I X-Received: by 2002:a65:6204:: with SMTP id d4-v6mr6203628pgv.121.1537976689741; Wed, 26 Sep 2018 08:44:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537976689; cv=none; d=google.com; s=arc-20160816; b=m9OgR4Rk0VgTyxDnQRnySfB4veejy8thMQY5WeMQqSvDSjGQyLPMy+fMm5ZU19cVqU lWNeqxqWoUC880x8BnOPO74movKRZKiYgJa6NGppNPJWjLdQlFhSaBCVqvd4FcrUu/I6 0/RG3trPn4x1VaqYHqlf2O75OfHvGGgD/07aqNI51DOmK3OvpqFjqC/knaHqyqgBQ8ZA oS+2fM4uVmZs0vN5/mcz/X0G+Ge3DC97CWrU7Du8FATuejMXo/MrCSvu64nQvZDSjbaB Pb4v33NMaog0JVa7Hw1HCsHjGycAzDplylrsjRqL+9uMn9/LF6PdkHwbM+9r+Xh716xR 4fpQ== 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=itlu2sM+kK09nTS1pZNRW5IhgmrokHEIQH3nT0W6i/E=; b=HwIiQ7zTD7JB+7XB6kCfO5gWf9sh+EzimRLUO+b069hXGoFQ9XkaeLJHLzalVPR+yy QtQBo87glEpsV257F4yAJd/RgZKYOK41i6l4T5mbWLamat33Wbji1zleUV+TTajQ2qWh kpyNXzQHMzwMrNRiNdQBWmM4T9nvstPBPxJBg5K1cwB2pbeZREVWiPfny/Bl09xHhIED jM3uEmehrRcPShKQYUPHObaFsX0nX1vvqJRRsyIGM0MeufltKSuiyCgnLT/udbTB68+c MfCzz8jJDu/k3obJFHFJav9QKN2ZWaplZ2sreit2gO0nLvO5MCpHGfhkOiKzlw6B7Jq8 BaRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=GMVFUh84; 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 h9-v6si5116596pgr.260.2018.09.26.08.44.33; Wed, 26 Sep 2018 08:44:49 -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=GMVFUh84; 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 S1728499AbeIZV5j (ORCPT + 99 others); Wed, 26 Sep 2018 17:57:39 -0400 Received: from mail-eopbgr00138.outbound.protection.outlook.com ([40.107.0.138]:15334 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727502AbeIZV5i (ORCPT ); Wed, 26 Sep 2018 17:57:38 -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=itlu2sM+kK09nTS1pZNRW5IhgmrokHEIQH3nT0W6i/E=; b=GMVFUh84d+cHBNPN7ddPsG2OaCJaEfM2INTzQMA99SBXaxHReQJN3pZ86CKZzi2x2Zdtko/VnjAaEOZQvxQ7lot+imVYy/88McCpeEFbUQ/BQkGIxYep+3wkSuaZWIUiIUd9pt94h+abTlRkPjBIGQd4efQXQgHPjxOPOBKFXlU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jan.dakinevich@virtuozzo.com; Received: from localhost (185.231.240.5) by AM4PR08MB2772.eurprd08.prod.outlook.com (2603:10a6:205:d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.25; Wed, 26 Sep 2018 15:43:46 +0000 Date: Wed, 26 Sep 2018 18:43:42 +0300 From: Jan Dakinevich To: Leon Romanovsky Cc: Jason Gunthorpe , Doug Ledford , Yishai Hadas , 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: <20180926184342.44deaa4f@virtuozzo.com> In-Reply-To: <20180918212351.GB3661@mtr-leonro.mtl.com> References: <1537275826-27247-1-git-send-email-jan.dakinevich@virtuozzo.com> <20180918144623.GI11367@ziepe.ca> <20180918212351.GB3661@mtr-leonro.mtl.com> 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: AM6PR0502CA0053.eurprd05.prod.outlook.com (2603:10a6:20b:56::30) To AM4PR08MB2772.eurprd08.prod.outlook.com (2603:10a6:205:d::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e8e597a5-06db-43b7-ffe3-08d623c6d8e7 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:AM4PR08MB2772; X-Microsoft-Exchange-Diagnostics: 1;AM4PR08MB2772;3:DG7b7ghDQaLjJdV4TAakPComlkcHnobFwdF+tWjbKJm8Ahu9zjzW63RXK5Utfl0IKxEG6bGJSn+/Ulcn7CLo6ZRvAq5igfy7z1nP2EJ/j6ywJD0ZMqFWJ6/uPXogC0jQ39QaYLl6xIX1st06vo4Obr0i30UNcbkqHtqypHW1182CAP5XOaskyyJkEsTgCVofiph7KN1+s+3ffmfvbQj9il/V1pPzc3rjoZyxD/ub4qG1iLYyltJ79K0zk1KHfNDh;25:tvHji71drt1EIEO/IBy7a4uTy7VoK8+yLtS4szhCR4NDnSuOdipn9bXJEqtVHmlE0wqlI1ofmpYpMbjZYgdAmnqXJtsQqpBH4oxjDsUoLGNsWpWv21Bp/8ofAYpNNtx95r0/hsqo2CSJ7+t5mX4Z4dxFgZLdBWOexweWtAxCxL5+k3un66LfrqJFXfPnJKN8rE62eJ7sul0PT9aNicfxVPMIBe2TNNYs+kX9E8c0NJrT6asT08Bek+r0DxnM/Yk8u/14xjl/+8jZt3l+DwV7ozeA3p1nUfQgPQDGdwc42mvug5apxAVuzddsYO11wNdDFY/uo7Cw1E6fGBhwsLMHAg==;31:FEizinco3lZm3OpSByXloAvXnjg9PANkRfNBaTh7YZ8hme9QN2ymGUeW/CL49LuVg+vY1s9617sAwkUNU+hbwC6L/5Z1s7wk1fYRZIOygF5vGt3+cq1iVb6TaWwZZeUTHIcWjSc40JL4Zka9de8Z1aqS4PTHdP3d+yxIRzS95cx+JHckH7ISNu2JdbIgR56dFigVKFHioz69sSr1HBsLIaUeZAmmczeSmT6WDg6iwO4= X-MS-TrafficTypeDiagnostic: AM4PR08MB2772: X-Microsoft-Exchange-Diagnostics: 1;AM4PR08MB2772;20:2gsYSMDGu/3fRnoXeZL5XDNR8URPdOyg1zl+RVlpP09x+8HUVAHC8VQomaADPKKmiH7jnct5vuT3RYTnKn1UaqopqTXBiTAheycx5XgcQRxkyxPIiZZT1pzKqP0ITX2dy2w5msGsyjAyny9LJ22bQi2TwnNlVaBsVT2nDN9/A+Fi0w+/bfP2zaOX3jDaJKpXgbnvMkc5agLoptaBRUEQsVDl77B907jsNxWkei657BfmzVW6f1FVMkUj29FSseSzFsy6Xe56Gix3cl1r1KBmuh+lf5uEOQ3fI01X010jE9jQGf4fx7SyeK/zfNvzEz/s0d2QQM50OIiE+6y0XzilwC7DesHFjwgDRmxaKupJjxEnaypUrENZkIKqQcbsOvroFdbM0TvpWHgRuCfU0AdivNvvYy8WV1V0AhoLY57oQf3F6jO3eLWcztiH3nbvdfpEvr3ZoyxJxQAV3qsevA1V7MKlvF6pfIRHGdeK0z110ju752xcspBhO3xDay76Bid6;4:LneUHg3LEd+X6YVwOKzhrS3z+bnySZ1Dc3haNyR4gpDl2GfJqujnUCyIvZOJE3wcB3mop2dT1r4g8VomoWee2cA1QuBHK8ZXxQMNzvlw1BEaszsHRv+A2bX1XAtVbK8vrhf6nwtuBlEUvz2DGMDYteKP24gc0WtJsTT1gX/QWAoxPmmRrWbYaqdtn/yMi7AmUj/f8Z0ZeZcbDCkOE1aDDBAhi8FNTwGsu5D7WNlcSJXQGVlq/c63Ma0HVi3qMLHVeFjGozQ/F3eZCWlispRyEA== 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)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231355)(944501410)(52105095)(149066)(150057)(6041310)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051);SRVR:AM4PR08MB2772;BCL:0;PCL:0;RULEID:;SRVR:AM4PR08MB2772; X-Forefront-PRVS: 08076ABC99 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(376002)(396003)(39850400004)(346002)(366004)(136003)(199004)(189003)(4326008)(2616005)(16526019)(26005)(956004)(81156014)(186003)(97736004)(81166006)(54906003)(76176011)(476003)(50466002)(50226002)(8936002)(478600001)(446003)(8676002)(36756003)(25786009)(47776003)(486006)(2906002)(44832011)(11346002)(6496006)(106356001)(6486002)(5660300001)(7736002)(23726003)(1076002)(305945005)(66066001)(14444005)(6666003)(230700001)(7416002)(6916009)(39060400002)(316002)(6246003)(86362001)(76506005)(6116002)(229853002)(53936002)(105586002)(68736007)(107886003)(3846002)(386003)(52116002)(39210200001);DIR:OUT;SFP:1102;SCL:1;SRVR:AM4PR08MB2772;H:localhost;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;AM4PR08MB2772;23:7UuJmw4fkWNxFv1BOB9+V6cst2bFrnw0HCU3i6FfV?= =?us-ascii?Q?VLBR7ph7Q84BPD8nvQMFKV8ZlmgEg7Myj+mlzHuIy1Aj/2Ym9mNkFWmHB5X3?= =?us-ascii?Q?4lXIS4+fchLvySP/vOTgMxvTdDpRblkcahWDQDaIkQFyiUfxb25YW4P5LD9p?= =?us-ascii?Q?MC1NixlI1gCDJwyXe1jK2x9ukSCShH2XI0zB9Hber4LyYZEdQlyPINsexI5G?= =?us-ascii?Q?d8f+CysmYv+VHMVbBVw8QtdHVYHZhRt24x5NvpvFfMF7irY9Q2Tydgc+9HK6?= =?us-ascii?Q?1rsbON9FJxb6LsB/my/Nhqv164jBrdKepNogHc2PxjJnLZ0C5xzaVbbtdCF9?= =?us-ascii?Q?gy1RJG0Of2uJ+fqGtSmPoB6HvTzOSNjF9A+86cLUMl5PGKq67QL9kvfq9m+f?= =?us-ascii?Q?vyudLmLRoDAxR5ErqZqgg8EwaSzsHxxYF+pe8skNMERCUoQObIG/u9D82g2m?=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961e/J59bY/mCzkBPpN3doPJ8vMIPV5O0qe7a25CHK/bulVXYhyU5Nw=;7:d8/01qBqgW6m2tisg/EYxNDMIjGIoHVYn1w20g0kEXE5dxm/sRBDviI2TjrkFsHZdFj1Wdr1tVWF0PrUUceOG/4McwVJr7dDZOiJ23krwvfJnXQHGJFY9JC/oilSxsZhJxXK/rUZV5xtPGoZsOCuj9B4NW1ThSY+j5eTBKmWrjzz7L2qtxZ1wCYmvFSZhtbgsz3avvbKRJCxKK4s0luhJs4V4qutLNnzaGwD/LsKfkg5ZHpoU/lay9PsnXxPzZ56 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;AM4PR08MB2772;20:uQqBD4axa1jQUsRRND7GqgZvk5NmdnkJq1K7KZbtK5IJ0clinhWt7EfplxVEtwsxDJMHvSuVwbg8s8ooypEsJvgHAARM/+dMXLItQk2is9JsBkLsaRP7TELrTjm3K07/RkRCmXxPywH7hvXfoPL5lBmdaCeqABiApWt6LysEMyE= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2018 15:43:46.0617 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e8e597a5-06db-43b7-ffe3-08d623c6d8e7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR08MB2772 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Sep 2018 00:23:51 +0300 Leon Romanovsky wrote: > On Tue, Sep 18, 2018 at 08:46:23AM -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? > This allocation could be triggered by userspace. It means that at _arbitrary_ time kernel could be asked for high order allocation. This case is considered unacceptable for system under significant load, since kernel would try to satisfy this memory request wasting the overall performance. > And before we are rushing to dissect mlx4_ib driver, can you > explain the rationale behind this change? The mlx4_ib driver > represents high-performance device which needs enough memory > resources to operate. Those devices are limited by number > of PCIs and SRIOV VFs (upto 126) and very rare allocated/deallocated. > > I would like to see real rationale behind such change. > > Thanks > > > > > Jason -- Best regards Jan Dakinevich