From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Laight Subject: RE: [PATCH v2 0/2] net/sctp: Avoid allocating high order memory with kmalloc() Date: Fri, 3 Aug 2018 16:43:28 +0000 Message-ID: References: <20180724173647.GA8881@localhost.localdomain> <20180803162102.19540-1-khorenko@virtuozzo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Cc: "oleg.babin@gmail.com" , "netdev@vger.kernel.org" , "linux-sctp@vger.kernel.org" , "David S . Miller" , "Vlad Yasevich" , Neil Horman , "Xin Long" , Andrey Ryabinin To: 'Konstantin Khorenko' , Marcelo Ricardo Leitner Return-path: Received: from eu-smtp-delivery-211.mimecast.com ([146.101.78.211]:57699 "EHLO eu-smtp-delivery-211.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727171AbeHCSi4 (ORCPT ); Fri, 3 Aug 2018 14:38:56 -0400 In-Reply-To: <20180803162102.19540-1-khorenko@virtuozzo.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: From: Konstantin Khorenko > Sent: 03 August 2018 17:21 > > Each SCTP association can have up to 65535 input and output streams. > For each stream type an array of sctp_stream_in or sctp_stream_out > structures is allocated using kmalloc_array() function. This function > allocates physically contiguous memory regions, so this can lead > to allocation of memory regions of very high order, i.e.: ... Given how useless SCTP streams are, does anything actually use more than about 4? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)