From: Tejun Heo <tj@kernel.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Christoph Lameter <cl@linux-foundation.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
michal.simek@petalogix.com, linux-next@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: problems in linux-next (Was: Re: linux-next: Tree for December 1)
Date: Wed, 02 Dec 2009 08:24:22 +0900 [thread overview]
Message-ID: <4B15A5A6.2090200@kernel.org> (raw)
In-Reply-To: <20091201160119.GA10826@elte.hu>
Hello,
On 12/02/2009 01:01 AM, Ingo Molnar wrote:
>>> The problem is that on UP configurations. Percpu memory allocator
>>> becomes a simple wrapper around kmalloc and there's no way to
>>> specify larger alignment when requesting memory from kmalloc.
>>
>> There is usually no point in aligning in UP. Alignment is typically
>> done for smp configurations to limit cache line bouncing and control
>> cache line use/
>
> There is a natural minimum alignment for UP and it's smaller than the
> cache-line size: machine word size. All our allocators (except bootmem)
> align to machine word so there's no need to specify this explicitly.
>
> Larger alignment than that just wastes memory - which waste UP systems
> can afford the least.
This isn't usual alignment. struct work_struct has one data fields
which is overloaded for two purposes. Lower few bits are used to
carry flags while upper bits are used to point to sruct
cpu_workqueue_struct. So, the number of available bits for flags are
determined by the alignment of cpu_workqueue_struct. Memory usage for
cwqs isn't a big concern here. Many workqueues will go away. I think
we'll end up with less than half of what we have today while we'll
continue to have large number of works.
I'll just create alloc_cwq function which forces the alignment on UP.
Thanks.
--
tejun
next prev parent reply other threads:[~2009-12-01 23:22 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-01 8:03 linux-next: Tree for December 1 Stephen Rothwell
2009-12-01 8:42 ` Michal Simek
2009-12-01 10:03 ` problems in linux-next (Was: Re: linux-next: Tree for December 1) Stephen Rothwell
2009-12-01 14:50 ` Tejun Heo
2009-12-01 15:48 ` Christoph Lameter
2009-12-01 16:01 ` Ingo Molnar
2009-12-01 23:24 ` Tejun Heo [this message]
2009-12-02 7:55 ` Tejun Heo
2009-12-02 11:19 ` Michal Simek
2009-12-02 12:13 ` Tejun Heo
2009-12-02 14:55 ` Christoph Lameter
2009-12-02 22:16 ` Tejun Heo
2009-12-02 22:24 ` Christoph Lameter
2009-12-02 23:00 ` Tejun Heo
2009-12-02 5:40 ` Tejun Heo
2009-12-02 6:05 ` Stephen Rothwell
2009-12-01 10:29 ` linux-next: Tree for December 1 Mark Brown
2009-12-01 10:43 ` Takashi Iwai
2009-12-01 11:19 ` Stephen Rothwell
2009-12-01 10:57 ` Stephen Rothwell
2009-12-01 18:51 ` [PATCH -next] media/radio/miro: depends on SND Randy Dunlap
2009-12-01 18:52 ` [PATCH -next] kmsg_dump: fix build for CONFIG_PRINTK=n Randy Dunlap
2009-12-02 8:35 ` Simon Kagstrom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B15A5A6.2090200@kernel.org \
--to=tj@kernel.org \
--cc=cl@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=michal.simek@petalogix.com \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.