Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1606282
| From | Aaron Lu <aaron.lu@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 3/5] mm: use a dedicated workqueue for the free workers |
| Date | 2017-03-22 09:50 +0100 |
| Message-ID | <tnK7T-81a-11@gated-at.bofh.it> (permalink) |
| References | <tld6q-5vn-13@gated-at.bofh.it> <tld6q-5vn-11@gated-at.bofh.it> <tnI65-6zm-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Mar 22, 2017 at 03:33:35PM +0900, Minchan Kim wrote: > Hi, > > On Wed, Mar 15, 2017 at 05:00:02PM +0800, Aaron Lu wrote: > > Introduce a workqueue for all the free workers so that user can fine > > tune how many workers can be active through sysfs interface: max_active. > > More workers will normally lead to better performance, but too many can > > cause severe lock contention. > > Let me ask a question. > > How well can workqueue distribute the jobs in multiple CPU? I would say it's good enough for my needs. After all, it doesn't need many kworkers to achieve the 50% time decrease: 2-4 kworkers for EP and 4-8 kworkers for EX are enough from previous attched data. > I don't ask about currency but parallelism. > I guess benefit you are seeing comes from the parallelism and > for your goal, unbound wq should spawn a thread per cpu and > doing the work in every each CPU. does it work? I don't think a unbound workqueue will spawn a thread per CPU, that seems too much a cost to have a unbound workqueue. 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. I guess you want to ask if the unbound workqueue can spawn enough threads to do the job? From the output of 'vmstat 1' during the free() test, I can see some 70+ processes in runnable state when I didn't set an upper limit for max_active of the workqueue. Thanks, Aaron
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