linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* zoned allocator in 2.3.27
@ 1999-11-12 10:17 Ingo Molnar
  0 siblings, 0 replies; only message in thread
From: Ingo Molnar @ 1999-11-12 10:17 UTC (permalink / raw)
  To: MM mailing list

we now have an explicitly zoned page allocator in 2.3.27 (yeah). Here is
the changelog, you guys might want to comment on it:


- explicit zone_t added:

	typedef struct zone_struct {
	       spinlock_t lock;
	       unsigned long offset;
	       unsigned long size;
	       free_area_t free_area[MAX_ORDER];
	
	       unsigned long free_pages;
	       unsigned long pages_low, pages_high;
	       int low_on_memory;
	       char * name;
	} zone_t;

  zone->offset is the offset into mem_map, page granularity. (it _should_
  work even if the boundary of zones does not lie on a 1<<MAX_ORDER
  boundary). zone->free_pages is the 'global' counter, and it's being
  exported via functions.

  i couldnt make up my mind wether to export the zone structure to outer
  subsystems, and ended up exporting these three functions:
  nr_free_pages(), nr_free_buffer_pages(), nr_free_highpages().

  zone->size is not strictly needed, but it doesnt hurt either and can be
  used for a temporary debugging check. (it has caught a nasty bug
  already)

- allocation uses per-zone spinlocks, page_alloc_lock is gone.

- removed area->count from the per-order bitmap structures. This speeds up
  things a bit, the only place which needed it was a debugging printout,
  which can get this info otherwise.

- fixed the utility functions rmqueue() and EXPAND() to work correctly
  with zone->offset. My experience is that in the attached version there
  are no bugs in this area, but i've left some debugging checks in there
  anyway, maybe it's getting triggered somewhere.

- moved mem_type_strs[] into zone->name

- fixed balance_memory to be generic, removed the #ifdef CONFIG_HIGHMEM
  maze.

- removed some old stuff not needed anymore

- renamed NR_MEM_LISTS to MAX_ORDER, that is more accurate.

- changed the free_area_init() interface to pass in zone sizes - this
  affects non-x86 architectures as well.

The NUMA and huge-mem folks can use this as a base for further hacking.
We are almost zone-neutral now, no more 'if (highmem)' type of stuff.

-- mingo

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-11-12 10:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-12 10:17 zoned allocator in 2.3.27 Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox