* alloc_tty_struct() question.
@ 2000-11-23 18:54 Tigran Aivazian
2000-11-23 19:02 ` Matti Aarnio
2000-11-23 19:54 ` Andi Kleen
0 siblings, 2 replies; 3+ messages in thread
From: Tigran Aivazian @ 2000-11-23 18:54 UTC (permalink / raw)
To: linux-kernel
Hi,
The sizeof(struct tty_struct) = 3084. Why don't we have a private slab
cache for it instead of getting a page and wasting some precious bytes at
the end? Potentially, we can have thousands of tty_struct allocated
(assuming we have thousands of concurrent users)...
regards,
Tigran
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: alloc_tty_struct() question.
2000-11-23 18:54 alloc_tty_struct() question Tigran Aivazian
@ 2000-11-23 19:02 ` Matti Aarnio
2000-11-23 19:54 ` Andi Kleen
1 sibling, 0 replies; 3+ messages in thread
From: Matti Aarnio @ 2000-11-23 19:02 UTC (permalink / raw)
To: Tigran Aivazian; +Cc: linux-kernel
On Thu, Nov 23, 2000 at 06:54:48PM +0000, Tigran Aivazian wrote:
> Hi,
>
> The sizeof(struct tty_struct) = 3084. Why don't we have a private slab
> cache for it instead of getting a page and wasting some precious bytes at
> the end? Potentially, we can have thousands of tty_struct allocated
> (assuming we have thousands of concurrent users)...
Potentially thousands, in practice some 10-30.
Wastage will be worse with 8k pages, of course.
> regards,
> Tigran
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: alloc_tty_struct() question.
2000-11-23 18:54 alloc_tty_struct() question Tigran Aivazian
2000-11-23 19:02 ` Matti Aarnio
@ 2000-11-23 19:54 ` Andi Kleen
1 sibling, 0 replies; 3+ messages in thread
From: Andi Kleen @ 2000-11-23 19:54 UTC (permalink / raw)
To: Tigran Aivazian; +Cc: linux-kernel
On Thu, Nov 23, 2000 at 06:54:48PM +0000, Tigran Aivazian wrote:
> Hi,
>
> The sizeof(struct tty_struct) = 3084. Why don't we have a private slab
> cache for it instead of getting a page and wasting some precious bytes at
> the end? Potentially, we can have thousands of tty_struct allocated
> (assuming we have thousands of concurrent users)...
A slab cache could only save significant memory if it allocated in
order 2 slabs (order 1 would waste exactly the same memory because
you only had a ~2K gap) Order 2 is nasty and unreliable.
-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-11-23 20:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-23 18:54 alloc_tty_struct() question Tigran Aivazian
2000-11-23 19:02 ` Matti Aarnio
2000-11-23 19:54 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®