lkml.org 
[lkml]   [2000]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: tty cleanup
Hi!

> > 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.

I also believe that it would be cleanup to kill get_zeroed_page and
replace it with kmalloc(sizeof structure()). Depending on structure
being smaller than 4096 is dirty hack (tm).
Pavel
--
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at discuss@linmodems.org

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.039 / U:0.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site