Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1607195
| From | Minchan Kim <minchan@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 3/5] mm: use a dedicated workqueue for the free workers |
| Date | 2017-03-23 08:40 +0100 |
| Message-ID | <to5vK-7s8-49@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <tld6q-5vn-11@gated-at.bofh.it> <tnI65-6zm-13@gated-at.bofh.it> <tnK7T-81a-11@gated-at.bofh.it> <tnKhz-85F-9@gated-at.bofh.it> <tnOOd-3b8-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Mar 22, 2017 at 09:43:04PM +0800, Aaron Lu wrote: > On Wed, Mar 22, 2017 at 05:55:12PM +0900, Minchan Kim wrote: > > On Wed, Mar 22, 2017 at 04:41:04PM +0800, Aaron Lu wrote: > > > My understanding of the unbound workqueue is that it will create a > > > thread pool for each node, versus each CPU as in the bound workqueue > > > case, and use threads from the thread pool(create threads if not enough) > > > to do the work. > > > > Yes, that was my understand so I read code and found that > > > > insert_work: > > .. > > if (__need_more_worker(pool)) > > wake_up_worker(pool); > > > > so I thought if there is a running thread in that node, workqueue > > will not wake any other threads so parallelism should be max 2. > > AFAIK, if the work goes sleep, scheduler will spawn new worker > > thread so the active worker could be a lot but I cannot see any > > significant sleepable point in that work(ie, batch_free_work). > > Looks like worker_thread() will spawn new worker through manage_worker(). > > Note that pool->nr_running will always be zero for an unbound workqueue > and thus need_more_worker() will return true as long as there are queued > work items in the pool. Aha, it solves my wonder. Thanks a lot!
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 3/5] mm: use a dedicated workqueue for the free workers Aaron Lu <aaron.lu@intel.com> - 2017-03-15 10:10 +0100
Re: [PATCH v2 3/5] mm: use a dedicated workqueue for the free workers Minchan Kim <minchan@kernel.org> - 2017-03-22 07:40 +0100
Re: [PATCH v2 3/5] mm: use a dedicated workqueue for the free workers Aaron Lu <aaron.lu@intel.com> - 2017-03-22 09:50 +0100
Re: [PATCH v2 3/5] mm: use a dedicated workqueue for the free workers Minchan Kim <minchan@kernel.org> - 2017-03-22 10:00 +0100
Re: [PATCH v2 3/5] mm: use a dedicated workqueue for the free workers Aaron Lu <aaron.lu@intel.com> - 2017-03-22 14:50 +0100
Re: [PATCH v2 3/5] mm: use a dedicated workqueue for the free workers Minchan Kim <minchan@kernel.org> - 2017-03-23 08:40 +0100
Re: [PATCH v2 3/5] mm: use a dedicated workqueue for the free workers Dave Hansen <dave.hansen@intel.com> - 2017-03-23 16:40 +0100
Re: [PATCH v2 3/5] mm: use a dedicated workqueue for the free workers Aaron Lu <aaron.lu@intel.com> - 2017-03-24 13:40 +0100
csiph-web