Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752447AbcLLQ5q (ORCPT ); Mon, 12 Dec 2016 11:57:46 -0500 Received: from mail-io0-f178.google.com ([209.85.223.178]:35885 "EHLO mail-io0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752188AbcLLQ5p (ORCPT ); Mon, 12 Dec 2016 11:57:45 -0500 MIME-Version: 1.0 In-Reply-To: References: <1481012975-44478-1-git-send-email-maninder1.s@samsung.com> <20161212112230epcms5p6af05aef34f72eab15061a166d18cff00@epcms5p6> From: Ard Biesheuvel Date: Mon, 12 Dec 2016 16:57:44 +0000 Message-ID: Subject: Re: Re: [PATCH 1/1] arm/module: maximum utilization of module area. To: Nicolas Pitre Cc: Vaneet Narang , "panand@redhat.com" , "arnd@arndb.de" , Russell King - ARM Linux , "linux-kernel@vger.kernel.org" , Ajeet Kumar Yadav , "chris.brandt@renesas.com" , "ssantosh@kernel.org" , Maninder Singh , "linux-arm-kernel@lists.infradead.org" , PANKAJ MISHRA Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1507 Lines: 34 On 12 December 2016 at 15:28, Nicolas Pitre wrote: > On Mon, 12 Dec 2016, Vaneet Narang wrote: > >> Hi, >> >> >A PC24 relocation has a range of +/-32MB. This means that where-ever >> >the module is placed, it must be capable of reaching any function >> >within the kernel text, which may itself be quite large (eg, 8MB, or >> >possibly larger). The module area exists to allow modules to be >> >located in an area where PC24 relocations are able to reach all of the >> >kernel text on sensibly configured kernels, thereby allowing for >> >optimal performance. >> > >> >If you wish to load large modules, then enable ARM_MODULE_PLTS, which >> >will use the less efficient PLT method (which is basically an indirect >> >function call) for relocations that PC24 can't handle, and will allow >> >the module to be loaded into the vmalloc area. >> > >> >Growing the module area so that smaller modules also get penalised by >> >the PLT indirection is not sane. >> >> This is exactly what i am saying. These changes are useful to accomdate >> 22MB modules without enabling ARM_MODULE_PLTS. > > I think you need to figure out why you need such a huge module in the > first place. That is very uncommon indeed. > Also, note that the module PLT code was recently optimized, to remove some pathological behavior which severely affected load times of large modules. Can you quantify the performance hit you are taking when using module PLTs? And the actual increase in memory footprint?