Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-26 Thread Peter Hurley
On 09/26/2013 05:58 PM, Andrew Morton wrote: On Thu, 26 Sep 2013 17:42:52 -0400 Peter Hurley wrote: On 09/26/2013 02:05 PM, Andrew Morton wrote: On Thu, 26 Sep 2013 13:35:32 -0400 Peter Hurley wrote: The issue with a single large kmalloc is that it may fail where 3 separate, page-or-less

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-26 Thread Andrew Morton
On Thu, 26 Sep 2013 17:42:52 -0400 Peter Hurley wrote: > On 09/26/2013 02:05 PM, Andrew Morton wrote: > > On Thu, 26 Sep 2013 13:35:32 -0400 Peter Hurley > > wrote: > > > >> The issue with a single large kmalloc is that it may fail where > >> 3 separate, page-or-less kmallocs would not have. >

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-26 Thread Peter Hurley
On 09/26/2013 02:05 PM, Andrew Morton wrote: On Thu, 26 Sep 2013 13:35:32 -0400 Peter Hurley wrote: The issue with a single large kmalloc is that it may fail where 3 separate, page-or-less kmallocs would not have. Or vmalloc fails first, because of internal fragmentation of the vmap arena.

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-26 Thread Andrew Morton
On Thu, 26 Sep 2013 13:35:32 -0400 Peter Hurley wrote: > The issue with a single large kmalloc is that it may fail where > 3 separate, page-or-less kmallocs would not have. Or vmalloc fails first, because of internal fragmentation of the vmap arena. This problem plus vmalloc's slowness are the

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-26 Thread Peter Hurley
On 09/26/2013 11:04 AM, Greg KH wrote: On Thu, Sep 26, 2013 at 07:31:47AM -0400, Peter Hurley wrote: On 09/26/2013 03:33 AM, Andrew Morton wrote: On Tue, 17 Sep 2013 20:22:42 -0400 Peter Hurley wrote: Looking over vmalloc.c, the critical section footprint of the vmap_area_lock could definit

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-26 Thread Peter Hurley
On 09/26/2013 11:32 AM, Andi Kleen wrote: On Thu, Sep 26, 2013 at 07:52:23AM -0400, Peter Hurley wrote: On 09/25/2013 11:20 PM, Andi Kleen wrote: Lin Ming writes: Would you like below patch? The loop body keeps rather complex state. It could easily get confused by parallel RCU changes. So

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-26 Thread Andi Kleen
On Thu, Sep 26, 2013 at 07:52:23AM -0400, Peter Hurley wrote: > On 09/25/2013 11:20 PM, Andi Kleen wrote: > >Lin Ming writes: > >> > >>Would you like below patch? > > > >The loop body keeps rather complex state. It could easily > >get confused by parallel RCU changes. > > > >So if the list changes

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-26 Thread Greg KH
On Thu, Sep 26, 2013 at 07:31:47AM -0400, Peter Hurley wrote: > On 09/26/2013 03:33 AM, Andrew Morton wrote: > >On Tue, 17 Sep 2013 20:22:42 -0400 Peter Hurley > >wrote: > > > >>Looking over vmalloc.c, the critical section footprint of the vmap_area_lock > >>could definitely be reduced (even near

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-26 Thread Peter Hurley
On 09/25/2013 11:20 PM, Andi Kleen wrote: Lin Ming writes: Would you like below patch? The loop body keeps rather complex state. It could easily get confused by parallel RCU changes. So if the list changes in parallel you may suddenly report very bogus values, as the va_start - prev_end com

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-26 Thread Peter Hurley
On 09/26/2013 03:33 AM, Andrew Morton wrote: On Tue, 17 Sep 2013 20:22:42 -0400 Peter Hurley wrote: Looking over vmalloc.c, the critical section footprint of the vmap_area_lock could definitely be reduced (even nearly eliminated), but that's a project for another day :) 20bafb3d23d10 ("n_tt

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-26 Thread Andrew Morton
On Tue, 17 Sep 2013 20:22:42 -0400 Peter Hurley wrote: > Looking over vmalloc.c, the critical section footprint of the vmap_area_lock > could definitely be reduced (even nearly eliminated), but that's a project for > another day :) 20bafb3d23d10 ("n_tty: Move buffers into n_tty_data") switched

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-25 Thread Andi Kleen
Lin Ming writes: > > Would you like below patch? The loop body keeps rather complex state. It could easily get confused by parallel RCU changes. So if the list changes in parallel you may suddenly report very bogus values, as the va_start - prev_end computation may be bogus. Perhaps it's ok (

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-25 Thread Lin Ming
On Wed, 2013-09-25 at 07:30 -0400, Peter Hurley wrote: > On 09/25/2013 05:04 AM, Lin Ming wrote: > > On Wed, Sep 18, 2013 at 8:22 AM, Peter Hurley > > wrote: > > [snip] > >> > >> Looking over vmalloc.c, the critical section footprint of the > >> vmap_area_lock > >> could definitely be reduced (e

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-25 Thread Lin Ming
On Wed, Sep 25, 2013 at 7:30 PM, Peter Hurley wrote: > On 09/25/2013 05:04 AM, Lin Ming wrote: >> >> On Wed, Sep 18, 2013 at 8:22 AM, Peter Hurley >> wrote: >> [snip] >>> >>> >>> Looking over vmalloc.c, the critical section footprint of the >>> vmap_area_lock >>> could definitely be reduced (even

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-25 Thread Peter Hurley
On 09/25/2013 05:04 AM, Lin Ming wrote: On Wed, Sep 18, 2013 at 8:22 AM, Peter Hurley wrote: [snip] Looking over vmalloc.c, the critical section footprint of the vmap_area_lock could definitely be reduced (even nearly eliminated), but that's a project for another day :) Hi Peter, I also loo

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-25 Thread Lin Ming
On Wed, Sep 18, 2013 at 8:22 AM, Peter Hurley wrote: [snip] > > Looking over vmalloc.c, the critical section footprint of the vmap_area_lock > could definitely be reduced (even nearly eliminated), but that's a project > for > another day :) Hi Peter, I also looked over vmallo.c, but didn't find

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-17 Thread Peter Hurley
On 09/12/2013 09:09 PM, Fengguang Wu wrote: On Fri, Sep 13, 2013 at 08:51:33AM +0800, Fengguang Wu wrote: Hi Peter, FYI, we noticed much increased vmap_area_lock contentions since this commit: commit 20bafb3d23d108bc0a896eb8b7c1501f4f649b77 Author: Peter Hurley Date: Sat Jun 15 10:21:19 201

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-17 Thread Peter Hurley
On 09/17/2013 07:22 PM, Fengguang Wu wrote: On Tue, Sep 17, 2013 at 11:34:21AM -0400, Peter Hurley wrote: On 09/12/2013 09:09 PM, Fengguang Wu wrote: On Fri, Sep 13, 2013 at 08:51:33AM +0800, Fengguang Wu wrote: Hi Peter, FYI, we noticed much increased vmap_area_lock contentions since this co

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-17 Thread Fengguang Wu
On Tue, Sep 17, 2013 at 11:34:21AM -0400, Peter Hurley wrote: > On 09/12/2013 09:09 PM, Fengguang Wu wrote: > >On Fri, Sep 13, 2013 at 08:51:33AM +0800, Fengguang Wu wrote: > >>Hi Peter, > >> > >>FYI, we noticed much increased vmap_area_lock contentions since this > >>commit: > >> > >>commit 20bafb

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-17 Thread Peter Hurley
On 09/12/2013 09:09 PM, Fengguang Wu wrote: On Fri, Sep 13, 2013 at 08:51:33AM +0800, Fengguang Wu wrote: Hi Peter, FYI, we noticed much increased vmap_area_lock contentions since this commit: commit 20bafb3d23d108bc0a896eb8b7c1501f4f649b77 Author: Peter Hurley Date: Sat Jun 15 10:21:19 201

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-16 Thread Fengguang Wu
On Mon, Sep 16, 2013 at 10:42:11PM -0400, Peter Hurley wrote: > On 09/12/2013 11:38 PM, Fengguang Wu wrote: > >On Thu, Sep 12, 2013 at 08:17:00PM -0700, Greg KH wrote: > >>On Fri, Sep 13, 2013 at 08:51:33AM +0800, Fengguang Wu wrote: > >>>Hi Peter, > >>> > >>>FYI, we noticed much increased vmap_are

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-16 Thread Peter Hurley
On 09/12/2013 11:38 PM, Fengguang Wu wrote: On Thu, Sep 12, 2013 at 08:17:00PM -0700, Greg KH wrote: On Fri, Sep 13, 2013 at 08:51:33AM +0800, Fengguang Wu wrote: Hi Peter, FYI, we noticed much increased vmap_area_lock contentions since this commit: What does that mean? What is happening, a

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-13 Thread Greg KH
On Fri, Sep 13, 2013 at 05:55:47AM -0400, Peter Hurley wrote: > On 09/12/2013 11:44 PM, Greg KH wrote: > > On Fri, Sep 13, 2013 at 11:38:04AM +0800, Fengguang Wu wrote: > >> On Thu, Sep 12, 2013 at 08:17:00PM -0700, Greg KH wrote: > >>> On Fri, Sep 13, 2013 at 08:51:33AM +0800, Fengguang Wu wrote:

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-13 Thread Peter Hurley
On 09/12/2013 11:44 PM, Greg KH wrote: On Fri, Sep 13, 2013 at 11:38:04AM +0800, Fengguang Wu wrote: On Thu, Sep 12, 2013 at 08:17:00PM -0700, Greg KH wrote: On Fri, Sep 13, 2013 at 08:51:33AM +0800, Fengguang Wu wrote: Hi Peter, FYI, we noticed much increased vmap_area_lock contentions since

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-12 Thread Greg KH
On Fri, Sep 13, 2013 at 11:38:04AM +0800, Fengguang Wu wrote: > On Thu, Sep 12, 2013 at 08:17:00PM -0700, Greg KH wrote: > > On Fri, Sep 13, 2013 at 08:51:33AM +0800, Fengguang Wu wrote: > > > Hi Peter, > > > > > > FYI, we noticed much increased vmap_area_lock contentions since this > > > commit:

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-12 Thread Fengguang Wu
On Thu, Sep 12, 2013 at 08:17:00PM -0700, Greg KH wrote: > On Fri, Sep 13, 2013 at 08:51:33AM +0800, Fengguang Wu wrote: > > Hi Peter, > > > > FYI, we noticed much increased vmap_area_lock contentions since this > > commit: > > What does that mean? What is happening, are we allocating/removing m

Re: increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-12 Thread Greg KH
On Fri, Sep 13, 2013 at 08:51:33AM +0800, Fengguang Wu wrote: > Hi Peter, > > FYI, we noticed much increased vmap_area_lock contentions since this > commit: What does that mean? What is happening, are we allocating/removing more memory now? What type of load were you running that showed this pr

increased vmap_area_lock contentions on "n_tty: Move buffers into n_tty_data"

2013-09-12 Thread Fengguang Wu
Hi Peter, FYI, we noticed much increased vmap_area_lock contentions since this commit: commit 20bafb3d23d108bc0a896eb8b7c1501f4f649b77 Author: Peter Hurley Date: Sat Jun 15 10:21:19 2013 -0400 n_tty: Move buffers into n_tty_data Reduce pointer reloading and improve locality-of-re