Messages in this thread | | | Date | Wed, 5 Jul 2000 20:01:22 +0200 | From | Pavel Machek <> | Subject | Re: 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/
| |