Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-16 Thread Luis Chamberlain
On Wed, Oct 16, 2024 at 01:40:55PM +0300, Mike Rapoport wrote: > On Tue, Oct 15, 2024 at 01:11:54PM -0700, Luis Chamberlain wrote: > > On Tue, Oct 15, 2024 at 08:54:29AM +0300, Mike Rapoport wrote: > > > On Mon, Oct 14, 2024 at 09:09:49PM -0700, Luis Chamberlain wrote: > > > > Mike, please run this

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-16 Thread Mike Rapoport
On Tue, Oct 15, 2024 at 01:11:54PM -0700, Luis Chamberlain wrote: > On Tue, Oct 15, 2024 at 08:54:29AM +0300, Mike Rapoport wrote: > > On Mon, Oct 14, 2024 at 09:09:49PM -0700, Luis Chamberlain wrote: > > > Mike, please run this with kmemleak enabled and running, and also try to > > > get > > > to

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-15 Thread Luis Chamberlain
On Tue, Oct 15, 2024 at 08:54:29AM +0300, Mike Rapoport wrote: > On Mon, Oct 14, 2024 at 09:09:49PM -0700, Luis Chamberlain wrote: > > Mike, please run this with kmemleak enabled and running, and also try to get > > tools/testing/selftests/kmod/kmod.sh to pass. > > There was an issue with kmemleak

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-14 Thread Mike Rapoport
On Mon, Oct 14, 2024 at 09:09:49PM -0700, Luis Chamberlain wrote: > Mike, please run this with kmemleak enabled and running, and also try to get > tools/testing/selftests/kmod/kmod.sh to pass. There was an issue with kmemleak, I fixed it here: https://lore.kernel.org/linux-mm/20241009180816.83591

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-14 Thread Luis Chamberlain
Mike, please run this with kmemleak enabled and running, and also try to get tools/testing/selftests/kmod/kmod.sh to pass. I run into silly boot issues with just a guest. Luis ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://l

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-14 Thread Luis Chamberlain
On Sun, Oct 13, 2024 at 08:26:26PM -0700, Andrew Morton wrote: > On Sun, 13 Oct 2024 11:43:41 +0300 Mike Rapoport wrote: > > > > > The idea is to keep everything together and have execmem_info describe > > > > all > > > > that architecture needs. > > > > > > But why? That's pretty different f

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-14 Thread Mike Rapoport
On Sun, Oct 13, 2024 at 10:55:25PM -0700, Christoph Hellwig wrote: > On Sun, Oct 13, 2024 at 11:43:41AM +0300, Mike Rapoport wrote: > > > But why? That's pretty different from our normal style of arch hooks, > > > and introduces an indirect call in a security sensitive area. > > > > Will change t

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-13 Thread Christoph Hellwig
On Sun, Oct 13, 2024 at 11:43:41AM +0300, Mike Rapoport wrote: > > But why? That's pretty different from our normal style of arch hooks, > > and introduces an indirect call in a security sensitive area. > > Will change to __weak hook. Isn't the callback required when using the large ROX page?

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-13 Thread Andrew Morton
On Sun, 13 Oct 2024 11:43:41 +0300 Mike Rapoport wrote: > > > The idea is to keep everything together and have execmem_info describe all > > > that architecture needs. > > > > But why? That's pretty different from our normal style of arch hooks, > > and introduces an indirect call in a securit

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-13 Thread Mike Rapoport
On Fri, Oct 11, 2024 at 12:46:23AM -0700, Christoph Hellwig wrote: > On Thu, Oct 10, 2024 at 03:57:33PM +0300, Mike Rapoport wrote: > > On Wed, Oct 09, 2024 at 11:58:33PM -0700, Christoph Hellwig wrote: > > > On Wed, Oct 09, 2024 at 09:08:15PM +0300, Mike Rapoport wrote: > > > > /** > > > > * st

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-11 Thread Christoph Hellwig
On Thu, Oct 10, 2024 at 03:57:33PM +0300, Mike Rapoport wrote: > On Wed, Oct 09, 2024 at 11:58:33PM -0700, Christoph Hellwig wrote: > > On Wed, Oct 09, 2024 at 09:08:15PM +0300, Mike Rapoport wrote: > > > /** > > > * struct execmem_info - architecture parameters for code allocations > > > + * @f

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-10 Thread Kees Bakker
Op 09-10-2024 om 20:08 schreef Mike Rapoport: From: "Mike Rapoport (Microsoft)" Using large pages to map text areas reduces iTLB pressure and improves performance. Extend execmem_alloc() with an ability to use huge pages with ROX permissions as a cache for smaller allocations. To populate the

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-10 Thread Mike Rapoport
On Wed, Oct 09, 2024 at 11:58:33PM -0700, Christoph Hellwig wrote: > On Wed, Oct 09, 2024 at 09:08:15PM +0300, Mike Rapoport wrote: > > /** > > * struct execmem_info - architecture parameters for code allocations > > + * @fill_trapping_insns: set memory to contain instructions that will trap > >

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-10 Thread Mike Rapoport
On Wed, Oct 09, 2024 at 01:24:27PM -0700, Andrew Morton wrote: > On Wed, 9 Oct 2024 21:08:15 +0300 Mike Rapoport wrote: > > > Using large pages to map text areas reduces iTLB pressure and improves > > performance. > > Are there any measurable performance improvements? I don't have any numbers,

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-09 Thread Christoph Hellwig
On Wed, Oct 09, 2024 at 09:08:15PM +0300, Mike Rapoport wrote: > /** > * struct execmem_info - architecture parameters for code allocations > + * @fill_trapping_insns: set memory to contain instructions that will trap > * @ranges: array of parameter sets defining architecture specific > * pa

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-09 Thread Andrew Morton
On Wed, 9 Oct 2024 21:08:15 +0300 Mike Rapoport wrote: > Using large pages to map text areas reduces iTLB pressure and improves > performance. Are there any measurable performance improvements? What are the effects of this series upon overall memory consumption? The lack of acks is a bit surp

[PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-09 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Using large pages to map text areas reduces iTLB pressure and improves performance. Extend execmem_alloc() with an ability to use huge pages with ROX permissions as a cache for smaller allocations. To populate the cache, a writable large page is allocated from