From owner-freebsd-hackers Fri Jan 22 20:26:15 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA10117 for freebsd-hackers-outgoing; Fri, 22 Jan 1999 20:26:15 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA10112 for ; Fri, 22 Jan 1999 20:26:13 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.2/8.9.1) id UAA58213; Fri, 22 Jan 1999 20:25:56 -0800 (PST) (envelope-from dillon) Date: Fri, 22 Jan 1999 20:25:56 -0800 (PST) From: Matthew Dillon Message-Id: <199901230425.UAA58213@apollo.backplane.com> To: "John S. Dyson" Cc: rcarter@pinyon.org (Russell L. Carter), dufault@hda.com, hackers@FreeBSD.ORG Subject: Re: Error in vm_fault change References: <199901230415.XAA62055@y.dyson.net> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Guys, guys... when I said 'priority' I simply meant 'some sort of scheduling mechanism'. I didn't mean 'priority' in the sense of some arbitrary static number, nor do I infer that we intentionally block any processes when memory *is* available. And when I said 'scheduler' I didn't mean scheduling for cpu, ok? I meant scheduling who the available memory is given to. As in deciding intelligently. There are lots of ways to do this. The easiest is to change FreeBSD's notion of when to block waiting for memory. Right now it's notion is ( from vm_page_alloc() ): case VM_ALLOC_NORMAL: if (cnt.v_free_count >= cnt.v_free_reserved) { m = vm_page_select_free(object, pindex, PQ_FREE); KASSERT(m != NULL, ("vm_page_alloc(NORMAL): missing page on free queue\n")); } else { m = vm_page_select_cache(object, pindex); ... } So, for example, one way to schedule memory is to adjust the notion of cnt.v_free_reserved based on some dynamic entity associated with the process: if (cnt.v_free_count >= cnt.v_free_reserved + curproc->fubar) { And then make curproc->fubar a function of something. That is ALL I am saying here. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message