~kris/9p

9hist

7378b287a0e9af2312ce4dc1b64fdb8321c2fef1 — David du Colombier 34 years ago a249b1e
Plan 9 from Bell Labs 1992-09-10
4 files changed, 17 insertions(+), 13 deletions(-)

M port/page.c
M port/stfcall.c
M port/swap.c
M ss/main.c
M port/page.c => port/page.c +1 -1
@@ 94,7 94,7 @@ retry:
		/*
		 * If called from fault and we lost the segment from underneath
		 * don't waste time allocating and freeing a page. Fault will call
		 * newpage again when it has reaquired the segment locks
		 * newpage again when it has reacquired the segment locks
		 */
		if(dontalloc)
			return 0;

M port/stfcall.c => port/stfcall.c +7 -3
@@ 7,7 7,7 @@

enum
{
	Twritehdr	= 15,	/* Min bytes for Twrite */
	Twritehdr	= 16,	/* Min bytes for Twrite */
	Rreadhdr	= 8,	/* Min bytes for Rread */
	Twritecnt	= 13,	/* Offset in byte stream of write count */
	Rreadcnt	= 5,	/* Offset for Readcnt */


@@ 135,8 135,12 @@ fcalliput(Queue *q, Block *bp)
		switch(bp->rptr[0]) {		/* This is the type */
		default:
			len = msglen[bp->rptr[0]];
			if(len == 0)
				error(Emountrpc);
			if(len == 0){
				bp = allocb(0);
				bp->type = M_HANGUP;
				PUTNEXT(q, bp);
				return;
			}
			if(q->len < len)
				return;
	

M port/swap.c => port/swap.c +7 -9
@@ 5,23 5,22 @@
#include	"fns.h"
#include	"../port/error.h"

/* Predeclaration */
int	canflush(Proc *p, Segment*);
void	executeio(void);
int	needpages(void*);
void	pageout(Proc *p, Segment*);
void	pagepte(int, Page**);
int	needpages(void*);
void	pager(void*);
void	executeio(void);
int	canflush(Proc *p, Segment*);

enum
{
	Maxpages = 500,	/* Max number of pageouts per segment pass */
};

Image 	swapimage;
static 	int swopen;
Page	*iolist[Maxpages];
int	ioptr;
	Image 	swapimage;
static 	int	swopen;
static	Page	*iolist[Maxpages];
static	int	ioptr;

void
swapinit(void)


@@ 161,7 160,6 @@ pageout(Proc *p, Segment *s)

	if(s->steal) {		/* Protected by /dev/proc */
		qunlock(&s->lk);
		putseg(s);
		return;
	}


M ss/main.c => ss/main.c +2 -0
@@ 450,6 450,8 @@ confinit(void)
	conf.frag = 32;
	if(cpuserver)
		conf.nproc = 500;

	conf.monitor = 0;
}

/*