Re: tty cleanup

From: Stephen C. Tweedie (sct@redhat.com)
Date: Mon Jul 03 2000 - 05:53:29 EST


Hi,

On Fri, Jun 30, 2000 at 12:14:21AM +0200, Rogier Wolff wrote:
>
> Theodore Y. Ts'o wrote:
> > + if (PAGE_SIZE != N_TTY_BUF_SIZE) {
> > + p = kmalloc(N_TTY_BUF_SIZE, prio);
>
> Last I looked (about two or three years ago), kmallocing 4096 bytes on
> a 8192-byte-page machine would allocate you a full page.

The slab allocator is neat, though. It is capable of storing the
descriptor information for allocated blocks in a separate structure,
so that power-of-two allocations can now be handled _much_ more
efficiently. The slab allocator can deal with PAGE_SIZE allocations
without having to resort to higher-order get_free_page calls, for
example.

Given that kmalloc currently uses the slab allocator, kmalloc(4096)
shouldn't be a problem any more.

Cheers,
 Stephen

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



This archive was generated by hypermail 2b29 : Fri Jul 07 2000 - 21:00:12 EST