[-mm] Add an owner to the mm_struct (v8) - Kernel

This is a discussion on [-mm] Add an owner to the mm_struct (v8) - Kernel ; Paul Menage wrote: > On Sat, Apr 5, 2008 at 10:38 PM, Balbir Singh wrote: >> > >> > How long does the test run for? How many threads does each client have? >> >> The test on each client ...

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 21 to 26 of 26

Thread: [-mm] Add an owner to the mm_struct (v8)

  1. Re: [-mm] Add an owner to the mm_struct (v8)

    Paul Menage wrote:
    > On Sat, Apr 5, 2008 at 10:38 PM, Balbir Singh wrote:
    >> >
    >> > How long does the test run for? How many threads does each client have?

    >>
    >> The test on each client side runs for about 10 seconds. I saw the client create
    >> up to 411 threads.
    >>

    >
    > I'm not convinced that an application that creates 400 threads and
    > exits in 10 seconds is particular representative of a high-performance
    > application.
    >


    I agree, but like I said earlier, this was the easily available ready made
    application I found. Do you know of any other highly threaded micro benchmark?

    > But I agree that it's an example of something it may be worth trying
    > to optimize for.
    >
    > You mention that you saw tgid exits - what order did the individual
    > threads exit in? If we threw the mm to the last thread in the thread
    > group rather than the first, would that help?


    The order was different each time. I suspect that when we have too many threads
    all exiting at once and they are all running in parallel, I don't know if we can
    have ordering or predict the order in which threads exit.

    --
    Warm Regards,
    Balbir Singh
    Linux Technology Center
    IBM, ISTL
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [-mm] Add an owner to the mm_struct (v8)

    On Mon, Apr 7, 2008 at 11:52 PM, Balbir Singh wrote:
    >
    > I agree, but like I said earlier, this was the easily available ready made
    > application I found. Do you know of any other highly threaded micro benchmark?
    >


    How about a simple program that creates N threads that just sleep,
    then has the main thread exit?

    Paul
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: [-mm] Add an owner to the mm_struct (v8)

    Paul Menage wrote:
    > On Mon, Apr 7, 2008 at 11:52 PM, Balbir Singh wrote:
    >> I agree, but like I said earlier, this was the easily available ready made
    >> application I found. Do you know of any other highly threaded micro benchmark?
    >>

    >
    > How about a simple program that creates N threads that just sleep,
    > then has the main thread exit?
    >


    That is not really representative of anything. I have that program handy. How do
    we measure the impact on throughput?

    --
    Warm Regards,
    Balbir Singh
    Linux Technology Center
    IBM, ISTL
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  4. Re: [-mm] Add an owner to the mm_struct (v8)

    On Tue, Apr 8, 2008 at 12:05 AM, Balbir Singh wrote:
    >
    > Paul Menage wrote:
    > > On Mon, Apr 7, 2008 at 11:52 PM, Balbir Singh wrote:
    > >> I agree, but like I said earlier, this was the easily available ready made
    > >> application I found. Do you know of any other highly threaded micro benchmark?
    > >>

    > >
    > > How about a simple program that creates N threads that just sleep,
    > > then has the main thread exit?
    > >

    >
    > That is not really representative of anything. I have that program handy. How do
    > we measure the impact on throughput?


    It's very representative of how much additional overhead in terms of
    mm->owner churn there is in a large multi-threaded application
    exiting, which is the thing that you're trying to optimize with the
    delayed thread group leader checks.

    Paul
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. Re: [-mm] Add an owner to the mm_struct (v8)

    On Fri, 04 Apr 2008 13:35:44 +0530
    Balbir Singh wrote:
    > + /*
    > + * Search through everything else. We should not get
    > + * here often
    > + */
    > + do_each_thread(g, c) {
    > + if (c->mm == mm)
    > + goto assign_new_owner;
    > + } while_each_thread(g, c);
    > +

    I'm sorry for my laziness.

    Why do_each_thread() ? for_each_process() is not enough ?
    (because of delay_group_leader().)

    And what we have to test for the worst case is following, right ?
    ==
    1. create a tons of threads.
    2. create a process which calls vfork().
    3. keep child alive and vfork() caller exits
    ==

    Thanks,
    -Kame

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  6. Re: [-mm] Add an owner to the mm_struct (v8)

    Paul Menage wrote:
    > On Tue, Apr 8, 2008 at 12:05 AM, Balbir Singh wrote:
    >> Paul Menage wrote:
    >> > On Mon, Apr 7, 2008 at 11:52 PM, Balbir Singh wrote:
    >> >> I agree, but like I said earlier, this was the easily available ready made
    >> >> application I found. Do you know of any other highly threaded micro benchmark?
    >> >>
    >> >
    >> > How about a simple program that creates N threads that just sleep,
    >> > then has the main thread exit?
    >> >

    >>
    >> That is not really representative of anything. I have that program handy. How do
    >> we measure the impact on throughput?

    >
    > It's very representative of how much additional overhead in terms of
    > mm->owner churn there is in a large multi-threaded application
    > exiting, which is the thing that you're trying to optimize with the
    > delayed thread group leader checks.
    >


    I see almost no overhead after the notification change optimization (notify only
    if owner belongs to a different cgroup).

    My program creates n processes with k threads each and forces the thread group
    leader to exit. For my experiment I created 10 processes with 800 threads each
    (NOTE: you need to change ulimit -s for this to work).

    I am going to remove the delay_group_leader() optimization and submit v9.

    --
    Warm Regards,
    Balbir Singh
    Linux Technology Center
    IBM, ISTL
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2