CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: jruoho Date: Wed Apr 11 06:45:16 UTC 2012 Modified Files: src/tests/lib/libc/gen: t_fpsetmask.c Log Message: As it turned out, the fpsetmask(3) tests were unnecessarily skipped on Qemu. Thus, remove xfails that do not trigger. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/gen/t_fpsetmask.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/gen/t_fpsetmask.c diff -u src/tests/lib/libc/gen/t_fpsetmask.c:1.5 src/tests/lib/libc/gen/t_fpsetmask.c:1.6 --- src/tests/lib/libc/gen/t_fpsetmask.c:1.5 Tue Apr 10 12:43:06 2012 +++ src/tests/lib/libc/gen/t_fpsetmask.c Wed Apr 11 06:45:16 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fpsetmask.c,v 1.5 2012/04/10 12:43:06 jruoho Exp $ */ +/* $NetBSD: t_fpsetmask.c,v 1.6 2012/04/11 06:45:16 jruoho Exp $ */ /*- * Copyright (c) 1995 The NetBSD Foundation, Inc. @@ -295,13 +295,7 @@ sigfpe(int s, siginfo_t *si, void *c) {\ if (strcmp(atf_config_get(atf_arch), macppc) == 0) \ atf_tc_expect_fail(PR port-macppc/46319); \ - if (system(cpuctl identify 0 | grep -q QEMU) == 0) \ - atf_tc_expect_fail(PR misc/44767); \ - if (system(cpuctl identify 0 | grep -q \ - 'cpu0: Intel Pentium II (Klamath) (686-class), id 0x633')\ - == 0) \ - atf_tc_expect_fail(PR misc/44767 \ -(heuristic match)); \ + \ m(t##_ops); \ }
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: jruoho Date: Wed Apr 11 10:18:26 UTC 2012 Modified Files: src/tests/lib/libc/gen: t_fpsetmask.c Log Message: Revisit the previous: fails on qemu/amd64 but not qemu/i386. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/gen/t_fpsetmask.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/gen/t_fpsetmask.c diff -u src/tests/lib/libc/gen/t_fpsetmask.c:1.6 src/tests/lib/libc/gen/t_fpsetmask.c:1.7 --- src/tests/lib/libc/gen/t_fpsetmask.c:1.6 Wed Apr 11 06:45:16 2012 +++ src/tests/lib/libc/gen/t_fpsetmask.c Wed Apr 11 10:18:25 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fpsetmask.c,v 1.6 2012/04/11 06:45:16 jruoho Exp $ */ +/* $NetBSD: t_fpsetmask.c,v 1.7 2012/04/11 10:18:25 jruoho Exp $ */ /*- * Copyright (c) 1995 The NetBSD Foundation, Inc. @@ -296,6 +296,10 @@ sigfpe(int s, siginfo_t *si, void *c) if (strcmp(atf_config_get(atf_arch), macppc) == 0) \ atf_tc_expect_fail(PR port-macppc/46319); \ \ + if (strcmp(atf_config_get(atf_arch), amd64) == 0 \ + system(cpuctl identify 0 | grep -q QEMU) == 0) \ + atf_tc_expect_fail(PR misc/44767); \ + \ m(t##_ops); \ }
CVS commit: src/sys/external/isc/atheros_hal/ic
Module Name:src Committed By: nakayama Date: Wed Apr 11 13:48:11 UTC 2012 Modified Files: src/sys/external/isc/atheros_hal/ic: ah_osdep.c Log Message: Fix ATHHAL_DEBUG by syncing HALDEBUG() with Atheros HAL code. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/external/isc/atheros_hal/ic/ah_osdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/isc/atheros_hal/ic/ah_osdep.c diff -u src/sys/external/isc/atheros_hal/ic/ah_osdep.c:1.5 src/sys/external/isc/atheros_hal/ic/ah_osdep.c:1.6 --- src/sys/external/isc/atheros_hal/ic/ah_osdep.c:1.5 Sun Jul 17 20:54:51 2011 +++ src/sys/external/isc/atheros_hal/ic/ah_osdep.c Wed Apr 11 13:48:11 2012 @@ -26,11 +26,11 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGES. * - * $Id: ah_osdep.c,v 1.5 2011/07/17 20:54:51 joerg Exp $ + * $Id: ah_osdep.c,v 1.6 2012/04/11 13:48:11 nakayama Exp $ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ah_osdep.c,v 1.5 2011/07/17 20:54:51 joerg Exp $); +__KERNEL_RCSID(0, $NetBSD: ah_osdep.c,v 1.6 2012/04/11 13:48:11 nakayama Exp $); #ifdef _KERNEL_OPT #include opt_athhal.h @@ -65,8 +65,8 @@ extern void ath_hal_assert_failed(const int lineno, const char* msg); #endif #ifdef ATHHAL_DEBUG -extern void HALDEBUG(struct ath_hal *ah, const char* fmt, ...); -extern void HALDEBUGn(struct ath_hal *ah, u_int level, const char* fmt, ...); +extern void HALDEBUG(struct ath_hal *ah, u_int mask, const char* fmt, ...) + __printflike(3,4); #endif /* ATHHAL_DEBUG */ #ifdef ATHHAL_DEBUG @@ -171,20 +171,9 @@ ath_hal_ether_sprintf(const u_int8_t *ma #ifdef ATHHAL_DEBUG void -HALDEBUG(struct ath_hal *ah, const char* fmt, ...) +HALDEBUG(struct ath_hal *ah, u_int mask, const char* fmt, ...) { - if (ath_hal_debug) { - va_list ap; - va_start(ap, fmt); - ath_hal_vprintf(ah, fmt, ap); - va_end(ap); - } -} - -void -HALDEBUGn(struct ath_hal *ah, u_int level, const char* fmt, ...) -{ - if (ath_hal_debug = level) { + if (ath_hal_debug mask) { va_list ap; va_start(ap, fmt); ath_hal_vprintf(ah, fmt, ap);
CVS commit: src/share/examples/puffs/pgfs
Module Name:src Committed By: yamt Date: Wed Apr 11 14:25:54 UTC 2012 Modified Files: src/share/examples/puffs/pgfs: mount.c pgfs_puffs.c Log Message: - enable writeback cache and namecache. - use setback hack to reduce number of puffs OPs. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/examples/puffs/pgfs/mount.c \ src/share/examples/puffs/pgfs/pgfs_puffs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/examples/puffs/pgfs/mount.c diff -u src/share/examples/puffs/pgfs/mount.c:1.1 src/share/examples/puffs/pgfs/mount.c:1.2 --- src/share/examples/puffs/pgfs/mount.c:1.1 Wed Oct 12 01:05:00 2011 +++ src/share/examples/puffs/pgfs/mount.c Wed Apr 11 14:25:54 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mount.c,v 1.1 2011/10/12 01:05:00 yamt Exp $ */ +/* $NetBSD: mount.c,v 1.2 2012/04/11 14:25:54 yamt Exp $ */ /*- * Copyright (c)2010,2011 YAMAMOTO Takashi, @@ -28,7 +28,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: mount.c,v 1.1 2011/10/12 01:05:00 yamt Exp $); +__RCSID($NetBSD: mount.c,v 1.2 2012/04/11 14:25:54 yamt Exp $); #endif /* not lint */ #include err.h @@ -73,7 +73,7 @@ main(int argc, char *argv[]) .m_flag = PGFS_MNT_ALT_DUMMY, .m_altloc = 1, }, MOPT_NULL, }; - uint32_t pflags = PUFFS_KFLAG_NOCACHE_NAME|PUFFS_KFLAG_WTCACHE; + uint32_t pflags = PUFFS_KFLAG_IAONDEMAND; unsigned int nconn = 8; bool debug = false; bool dosync; Index: src/share/examples/puffs/pgfs/pgfs_puffs.c diff -u src/share/examples/puffs/pgfs/pgfs_puffs.c:1.1 src/share/examples/puffs/pgfs/pgfs_puffs.c:1.2 --- src/share/examples/puffs/pgfs/pgfs_puffs.c:1.1 Wed Oct 12 01:05:00 2011 +++ src/share/examples/puffs/pgfs/pgfs_puffs.c Wed Apr 11 14:25:54 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pgfs_puffs.c,v 1.1 2011/10/12 01:05:00 yamt Exp $ */ +/* $NetBSD: pgfs_puffs.c,v 1.2 2012/04/11 14:25:54 yamt Exp $ */ /*- * Copyright (c)2010,2011 YAMAMOTO Takashi, @@ -32,7 +32,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: pgfs_puffs.c,v 1.1 2011/10/12 01:05:00 yamt Exp $); +__RCSID($NetBSD: pgfs_puffs.c,v 1.2 2012/04/11 14:25:54 yamt Exp $); #endif /* not lint */ #include assert.h @@ -655,6 +655,7 @@ retry: if (error != 0) { goto got_error; } + puffs_setback(puffs_cc_getcc(pu), PUFFS_SETBACK_INACT_N2); return 0; got_error: rollback(xc); @@ -704,6 +705,7 @@ retry: if (error != 0) { goto got_error; } + puffs_setback(puffs_cc_getcc(pu), PUFFS_SETBACK_INACT_N2); return 0; got_error: rollback(xc);
CVS commit: src/share/examples/puffs/pgfs
Module Name:src Committed By: yamt Date: Wed Apr 11 14:26:20 UTC 2012 Modified Files: src/share/examples/puffs/pgfs: newfs.sql pgfs_puffs.c pgfs_subs.c pgfs_subs.h Log Message: reduce number of SQL statements for inactivate To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/examples/puffs/pgfs/newfs.sql \ src/share/examples/puffs/pgfs/pgfs_subs.h cvs rdiff -u -r1.2 -r1.3 src/share/examples/puffs/pgfs/pgfs_puffs.c cvs rdiff -u -r1.3 -r1.4 src/share/examples/puffs/pgfs/pgfs_subs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/examples/puffs/pgfs/newfs.sql diff -u src/share/examples/puffs/pgfs/newfs.sql:1.1 src/share/examples/puffs/pgfs/newfs.sql:1.2 --- src/share/examples/puffs/pgfs/newfs.sql:1.1 Wed Oct 12 01:05:00 2011 +++ src/share/examples/puffs/pgfs/newfs.sql Wed Apr 11 14:26:19 2012 @@ -1,4 +1,4 @@ --- $NetBSD: newfs.sql,v 1.1 2011/10/12 01:05:00 yamt Exp $ +-- $NetBSD: newfs.sql,v 1.2 2012/04/11 14:26:19 yamt Exp $ -- Copyright (c)2010,2011 YAMAMOTO Takashi, -- All rights reserved. @@ -71,7 +71,7 @@ CREATE TABLE file ( -- datafork table maintains the association between our files and its backing -- large objects. CREATE TABLE datafork ( - fileid fileid PRIMARY KEY REFERENCES file, + fileid fileid PRIMARY KEY, -- REFERENCES file loid Oid NOT NULL UNIQUE); -- we want the following but lo lives in system catalogs. -- loid REFERENCES pg_largeobject_metadata(oid); Index: src/share/examples/puffs/pgfs/pgfs_subs.h diff -u src/share/examples/puffs/pgfs/pgfs_subs.h:1.1 src/share/examples/puffs/pgfs/pgfs_subs.h:1.2 --- src/share/examples/puffs/pgfs/pgfs_subs.h:1.1 Wed Oct 12 01:05:00 2011 +++ src/share/examples/puffs/pgfs/pgfs_subs.h Wed Apr 11 14:26:19 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pgfs_subs.h,v 1.1 2011/10/12 01:05:00 yamt Exp $ */ +/* $NetBSD: pgfs_subs.h,v 1.2 2012/04/11 14:26:19 yamt Exp $ */ /*- * Copyright (c)2010,2011 YAMAMOTO Takashi, @@ -68,6 +68,6 @@ int mklinkfile(struct Xconn *, fileid_t, uid_t, gid_t, fileid_t *); int mklinkfile_lo(struct Xconn *, fileid_t, const char *, enum vtype, mode_t, uid_t, gid_t, fileid_t *, int *); -int cleanupfile(struct Xconn *, fileid_t, struct vattr *); +int cleanupfile(struct Xconn *, fileid_t); int check_path(struct Xconn *, fileid_t, fileid_t); int isempty(struct Xconn *, fileid_t, bool *); Index: src/share/examples/puffs/pgfs/pgfs_puffs.c diff -u src/share/examples/puffs/pgfs/pgfs_puffs.c:1.2 src/share/examples/puffs/pgfs/pgfs_puffs.c:1.3 --- src/share/examples/puffs/pgfs/pgfs_puffs.c:1.2 Wed Apr 11 14:25:54 2012 +++ src/share/examples/puffs/pgfs/pgfs_puffs.c Wed Apr 11 14:26:19 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pgfs_puffs.c,v 1.2 2012/04/11 14:25:54 yamt Exp $ */ +/* $NetBSD: pgfs_puffs.c,v 1.3 2012/04/11 14:26:19 yamt Exp $ */ /*- * Copyright (c)2010,2011 YAMAMOTO Takashi, @@ -32,7 +32,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: pgfs_puffs.c,v 1.2 2012/04/11 14:25:54 yamt Exp $); +__RCSID($NetBSD: pgfs_puffs.c,v 1.3 2012/04/11 14:26:19 yamt Exp $); #endif /* not lint */ #include assert.h @@ -720,7 +720,6 @@ pgfs_node_inactive(struct puffs_usermoun { struct Xconn *xc; fileid_t fileid = cookie_to_fileid(opc); - struct vattr va; int error; /* @@ -734,18 +733,10 @@ pgfs_node_inactive(struct puffs_usermoun DPRINTF(%llu\n, fileid); retry: xc = begin(pu); - error = getattr(xc, fileid, va, GETATTR_NLINK|GETATTR_TYPE); + error = cleanupfile(xc, fileid); if (error != 0) { - DPRINTF(%llu GETATTR fail\n, fileid); goto got_error; } - if (va.va_nlink == 0) { - DPRINTF(%llu nlink=0\n, fileid); - error = cleanupfile(xc, fileid, va); - if (error != 0) { - goto got_error; - } - } error = commit(xc); if (error != 0) { goto got_error; Index: src/share/examples/puffs/pgfs/pgfs_subs.c diff -u src/share/examples/puffs/pgfs/pgfs_subs.c:1.3 src/share/examples/puffs/pgfs/pgfs_subs.c:1.4 --- src/share/examples/puffs/pgfs/pgfs_subs.c:1.3 Thu Oct 13 14:40:06 2011 +++ src/share/examples/puffs/pgfs/pgfs_subs.c Wed Apr 11 14:26:19 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pgfs_subs.c,v 1.3 2011/10/13 14:40:06 yamt Exp $ */ +/* $NetBSD: pgfs_subs.c,v 1.4 2012/04/11 14:26:19 yamt Exp $ */ /*- * Copyright (c)2010,2011 YAMAMOTO Takashi, @@ -46,7 +46,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: pgfs_subs.c,v 1.3 2011/10/13 14:40:06 yamt Exp $); +__RCSID($NetBSD: pgfs_subs.c,v 1.4 2012/04/11 14:26:19 yamt Exp $); #endif /* not lint */ #include assert.h @@ -785,18 +785,31 @@ mklinkfile_lo(struct Xconn *xc, fileid_t } int -cleanupfile(struct Xconn *xc, fileid_t fileid, struct vattr *va) +cleanupfile(struct Xconn *xc, fileid_t fileid) { static struct cmd *c; + char *type; + unsigned int vtype; + int error; - /* - * XXX what to do when the filesystem is shared? - */ - - if (va-va_type == VREG || va-va_type == VLNK) {
CVS commit: src/share/examples/puffs/pgfs
Module Name:src Committed By: yamt Date: Wed Apr 11 14:26:45 UTC 2012 Modified Files: src/share/examples/puffs/pgfs: pgfs_db.c pgfs_db.h pgfs_puffs.c Log Message: abuse application_name to show the last puffs activity for the connection. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/examples/puffs/pgfs/pgfs_db.c \ src/share/examples/puffs/pgfs/pgfs_db.h cvs rdiff -u -r1.3 -r1.4 src/share/examples/puffs/pgfs/pgfs_puffs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/examples/puffs/pgfs/pgfs_db.c diff -u src/share/examples/puffs/pgfs/pgfs_db.c:1.1 src/share/examples/puffs/pgfs/pgfs_db.c:1.2 --- src/share/examples/puffs/pgfs/pgfs_db.c:1.1 Wed Oct 12 01:05:00 2011 +++ src/share/examples/puffs/pgfs/pgfs_db.c Wed Apr 11 14:26:44 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pgfs_db.c,v 1.1 2011/10/12 01:05:00 yamt Exp $ */ +/* $NetBSD: pgfs_db.c,v 1.2 2012/04/11 14:26:44 yamt Exp $ */ /*- * Copyright (c)2010,2011 YAMAMOTO Takashi, @@ -32,7 +32,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: pgfs_db.c,v 1.1 2011/10/12 01:05:00 yamt Exp $); +__RCSID($NetBSD: pgfs_db.c,v 1.2 2012/04/11 14:26:44 yamt Exp $); #endif /* not lint */ #include assert.h @@ -652,13 +652,50 @@ simplefetch(struct Xconn *xc, Oid type, return error; } +static void +setlabel(struct Xconn *xc, const char *label) +{ + int error; + + /* + * put the label into application_name so that it's shown in + * pg_stat_activity. we are sure that our labels don't need + * PQescapeStringConn. + * + * example: + * SELECT pid,application_name,query FROM pg_stat_activity + * WHERE state 'idle' + */ + + if (label != NULL) { + struct cmd *c; + char cmd_str[1024]; + + snprintf(cmd_str, sizeof(cmd_str), + SET application_name TO 'pgfs: %s', label); + c = createcmd(cmd_str, CMD_NOPREPARE); + error = simplecmd(xc, c); + freecmd(c); + assert(error == 0); + } else { +#if 0 /* don't bother to clear label */ + static struct cmd *c; + + CREATECMD_NOPARAM(c, SET application_name TO 'pgfs'); + error = simplecmd(xc, c); + assert(error == 0); +#endif + } +} + struct Xconn * -begin(struct puffs_usermount *pu) +begin(struct puffs_usermount *pu, const char *label) { struct Xconn *xc = getxc(puffs_cc_getcc(pu)); static struct cmd *c; int error; + setlabel(xc, label); CREATECMD_NOPARAM(c, BEGIN); assert(!xc-in_trans); error = simplecmd(xc, c); @@ -669,12 +706,13 @@ begin(struct puffs_usermount *pu) } struct Xconn * -begin_readonly(struct puffs_usermount *pu) +begin_readonly(struct puffs_usermount *pu, const char *label) { struct Xconn *xc = getxc(puffs_cc_getcc(pu)); static struct cmd *c; int error; + setlabel(xc, label); CREATECMD_NOPARAM(c, BEGIN READ ONLY); assert(!xc-in_trans); error = simplecmd(xc, c); @@ -706,6 +744,7 @@ rollback(struct Xconn *xc) assert(error == 0); } DPRINTF(xc %p rollback %p\n, xc, xc-owner); + setlabel(xc, NULL); relxc(xc); } @@ -717,6 +756,7 @@ commit(struct Xconn *xc) CREATECMD_NOPARAM(c, COMMIT); error = simplecmd(xc, c); + setlabel(xc, NULL); if (error == 0) { DPRINTF(xc %p commit %p\n, xc, xc-owner); relxc(xc); @@ -841,7 +881,7 @@ pgfs_connectdb(struct puffs_usermount *p assert(xc-id 32); PQsetNoticeReceiver(conn, pgfs_notice_receiver, xc); TAILQ_INSERT_HEAD(xclist, xc, list); - xc2 = begin(pu); + xc2 = begin(pu, NULL); assert(xc2 == xc); c = createcmd(SET search_path TO pgfs, CMD_NOPREPARE); error = simplecmd(xc, c); @@ -929,7 +969,7 @@ flush_xacts(struct puffs_usermount *pu) DPRINTF(%p start flushing\n, cc); flusher = cc; retry: - xc = begin(pu); + xc = begin(pu, flush); CREATECMD_NOPARAM(c, SELECT setval('dummyseq', 1) WHERE pg_current_xlog_insert_location() pg_current_xlog_location()); error = sendcmd(xc, c); Index: src/share/examples/puffs/pgfs/pgfs_db.h diff -u src/share/examples/puffs/pgfs/pgfs_db.h:1.1 src/share/examples/puffs/pgfs/pgfs_db.h:1.2 --- src/share/examples/puffs/pgfs/pgfs_db.h:1.1 Wed Oct 12 01:05:00 2011 +++ src/share/examples/puffs/pgfs/pgfs_db.h Wed Apr 11 14:26:44 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pgfs_db.h,v 1.1 2011/10/12 01:05:00 yamt Exp $ */ +/* $NetBSD: pgfs_db.h,v 1.2 2012/04/11 14:26:44 yamt Exp $ */ /*- * Copyright (c)2010,2011 YAMAMOTO Takashi, @@ -60,8 +60,8 @@ void fetchinit(struct fetchstatus *, str int fetchnext(struct fetchstatus *, unsigned int, const Oid *, ...); void fetchdone(struct fetchstatus *); -struct Xconn *begin(struct puffs_usermount *); -struct Xconn *begin_readonly(struct puffs_usermount *); +struct Xconn *begin(struct puffs_usermount *, const char *); +struct Xconn *begin_readonly(struct puffs_usermount *, const char *); void rollback(struct Xconn *); int commit(struct Xconn *); int commit_sync(struct Xconn *); Index: src/share/examples/puffs/pgfs/pgfs_puffs.c diff -u
CVS commit: src/share/examples/puffs/pgfs
Module Name:src Committed By: yamt Date: Wed Apr 11 14:27:15 UTC 2012 Modified Files: src/share/examples/puffs/pgfs: newfs.sql Log Message: remove FK references as it creates more problems than it solves. particularly, it involves shared lock on the referenced table and causes frequent deadlock. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/examples/puffs/pgfs/newfs.sql Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/examples/puffs/pgfs/newfs.sql diff -u src/share/examples/puffs/pgfs/newfs.sql:1.2 src/share/examples/puffs/pgfs/newfs.sql:1.3 --- src/share/examples/puffs/pgfs/newfs.sql:1.2 Wed Apr 11 14:26:19 2012 +++ src/share/examples/puffs/pgfs/newfs.sql Wed Apr 11 14:27:15 2012 @@ -1,4 +1,4 @@ --- $NetBSD: newfs.sql,v 1.2 2012/04/11 14:26:19 yamt Exp $ +-- $NetBSD: newfs.sql,v 1.3 2012/04/11 14:27:15 yamt Exp $ -- Copyright (c)2010,2011 YAMAMOTO Takashi, -- All rights reserved. @@ -79,10 +79,10 @@ CREATE TABLE datafork ( -- a row in the dirent table describes a directory entry. -- the .. and . entries are handled differently and never appear here. CREATE TABLE dirent ( - parent_fileid fileid NOT NULL REFERENCES file, + parent_fileid fileid NOT NULL, -- REFERENCES file, name text NOT NULL, cookie int8 NOT NULL UNIQUE DEFAULT nextval('dircookie_seq'), - child_fileid fileid NOT NULL REFERENCES file, + child_fileid fileid NOT NULL, -- REFERENCES file, CONSTRAINT dirent_pkey PRIMARY KEY(parent_fileid, name), CONSTRAINT dirent_notdot CHECK(name '.'), CONSTRAINT dirent_notdotdot CHECK(name '..'),
CVS commit: src/share/examples/puffs/pgfs
Module Name:src Committed By: yamt Date: Wed Apr 11 14:27:43 UTC 2012 Modified Files: src/share/examples/puffs/pgfs: pgfs_db.c Log Message: setlabel: save SQL statements by caching the last label To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/examples/puffs/pgfs/pgfs_db.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/examples/puffs/pgfs/pgfs_db.c diff -u src/share/examples/puffs/pgfs/pgfs_db.c:1.2 src/share/examples/puffs/pgfs/pgfs_db.c:1.3 --- src/share/examples/puffs/pgfs/pgfs_db.c:1.2 Wed Apr 11 14:26:44 2012 +++ src/share/examples/puffs/pgfs/pgfs_db.c Wed Apr 11 14:27:43 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pgfs_db.c,v 1.2 2012/04/11 14:26:44 yamt Exp $ */ +/* $NetBSD: pgfs_db.c,v 1.3 2012/04/11 14:27:43 yamt Exp $ */ /*- * Copyright (c)2010,2011 YAMAMOTO Takashi, @@ -32,7 +32,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: pgfs_db.c,v 1.2 2012/04/11 14:26:44 yamt Exp $); +__RCSID($NetBSD: pgfs_db.c,v 1.3 2012/04/11 14:27:43 yamt Exp $); #endif /* not lint */ #include assert.h @@ -61,6 +61,7 @@ struct Xconn { struct puffs_cc *owner; bool in_trans; int id; + const char *label; }; static void @@ -652,6 +653,11 @@ simplefetch(struct Xconn *xc, Oid type, return error; } +/* + * setlabel: set the descriptive label for the connection. + * + * we use simple pointer comparison for label equality check. + */ static void setlabel(struct Xconn *xc, const char *label) { @@ -667,7 +673,7 @@ setlabel(struct Xconn *xc, const char *l * WHERE state 'idle' */ - if (label != NULL) { + if (label != NULL label != xc-label) { struct cmd *c; char cmd_str[1024]; @@ -677,6 +683,7 @@ setlabel(struct Xconn *xc, const char *l error = simplecmd(xc, c); freecmd(c); assert(error == 0); + xc-label = label; } else { #if 0 /* don't bother to clear label */ static struct cmd *c; @@ -878,6 +885,7 @@ pgfs_connectdb(struct puffs_usermount *p xc-owner = NULL; xc-in_trans = false; xc-id = xcid++; + xc-label = NULL; assert(xc-id 32); PQsetNoticeReceiver(conn, pgfs_notice_receiver, xc); TAILQ_INSERT_HEAD(xclist, xc, list);
CVS commit: src/share/examples/puffs/pgfs
Module Name:src Committed By: yamt Date: Wed Apr 11 14:28:18 UTC 2012 Modified Files: src/share/examples/puffs/pgfs: pgfs_subs.c Log Message: don't bother to call lo_close. as we ever open a few LOs at most in a transaction, just let them be closed automatically at the end of the transaction. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/examples/puffs/pgfs/pgfs_subs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/examples/puffs/pgfs/pgfs_subs.c diff -u src/share/examples/puffs/pgfs/pgfs_subs.c:1.4 src/share/examples/puffs/pgfs/pgfs_subs.c:1.5 --- src/share/examples/puffs/pgfs/pgfs_subs.c:1.4 Wed Apr 11 14:26:19 2012 +++ src/share/examples/puffs/pgfs/pgfs_subs.c Wed Apr 11 14:28:18 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pgfs_subs.c,v 1.4 2012/04/11 14:26:19 yamt Exp $ */ +/* $NetBSD: pgfs_subs.c,v 1.5 2012/04/11 14:28:18 yamt Exp $ */ /*- * Copyright (c)2010,2011 YAMAMOTO Takashi, @@ -46,7 +46,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: pgfs_subs.c,v 1.4 2012/04/11 14:26:19 yamt Exp $); +__RCSID($NetBSD: pgfs_subs.c,v 1.5 2012/04/11 14:28:18 yamt Exp $); #endif /* not lint */ #include assert.h @@ -335,6 +335,14 @@ my_lo_open(struct Xconn *xc, Oid loid, i int my_lo_close(struct Xconn *xc, int32_t fd) { +#if 1 + /* + * do nothing. + * + * LO handles are automatically closed at the end of transactions. + * our transactions are small enough. + */ +#else static struct cmd *c; int32_t ret; int error; @@ -349,6 +357,7 @@ my_lo_close(struct Xconn *xc, int32_t fd return error; } assert(ret == 0); +#endif return 0; }
CVS commit: src/share/examples/puffs/pgfs
Module Name:src Committed By: yamt Date: Wed Apr 11 14:28:46 UTC 2012 Modified Files: src/share/examples/puffs/pgfs: newfs.sql Log Message: comment To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/examples/puffs/pgfs/newfs.sql Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/examples/puffs/pgfs/newfs.sql diff -u src/share/examples/puffs/pgfs/newfs.sql:1.3 src/share/examples/puffs/pgfs/newfs.sql:1.4 --- src/share/examples/puffs/pgfs/newfs.sql:1.3 Wed Apr 11 14:27:15 2012 +++ src/share/examples/puffs/pgfs/newfs.sql Wed Apr 11 14:28:46 2012 @@ -1,4 +1,4 @@ --- $NetBSD: newfs.sql,v 1.3 2012/04/11 14:27:15 yamt Exp $ +-- $NetBSD: newfs.sql,v 1.4 2012/04/11 14:28:46 yamt Exp $ -- Copyright (c)2010,2011 YAMAMOTO Takashi, -- All rights reserved. @@ -44,8 +44,8 @@ CREATE DOMAIN uid AS int8 NOT NULL CHECK CREATE DOMAIN gid AS int8 NOT NULL CHECK(VALUE = 0); CREATE DOMAIN mode AS int8 NOT NULL CHECK(VALUE = 0 AND VALUE = 7*8*8+7*8+7); CREATE DOMAIN nlink AS int8 NOT NULL CHECK(VALUE = 0); -CREATE SEQUENCE fileid_seq START WITH 1; -CREATE SEQUENCE dircookie_seq START WITH 3; +CREATE SEQUENCE fileid_seq START WITH 1; -- 1 will be used for root directory +CREATE SEQUENCE dircookie_seq START WITH 3; -- see PGFS_DIRCOOKIE_* CREATE TYPE filetype AS ENUM ( 'regular', 'directory',
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: jruoho Date: Wed Apr 11 16:18:39 UTC 2012 Modified Files: src/tests/lib/libc/gen: t_fpsetmask.c Log Message: Flip previous (i386/qemu fails, not the amd64/qemu). To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/gen/t_fpsetmask.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/gen/t_fpsetmask.c diff -u src/tests/lib/libc/gen/t_fpsetmask.c:1.7 src/tests/lib/libc/gen/t_fpsetmask.c:1.8 --- src/tests/lib/libc/gen/t_fpsetmask.c:1.7 Wed Apr 11 10:18:25 2012 +++ src/tests/lib/libc/gen/t_fpsetmask.c Wed Apr 11 16:18:39 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fpsetmask.c,v 1.7 2012/04/11 10:18:25 jruoho Exp $ */ +/* $NetBSD: t_fpsetmask.c,v 1.8 2012/04/11 16:18:39 jruoho Exp $ */ /*- * Copyright (c) 1995 The NetBSD Foundation, Inc. @@ -296,7 +296,7 @@ sigfpe(int s, siginfo_t *si, void *c) if (strcmp(atf_config_get(atf_arch), macppc) == 0) \ atf_tc_expect_fail(PR port-macppc/46319); \ \ - if (strcmp(atf_config_get(atf_arch), amd64) == 0 \ + if (strcmp(atf_config_get(atf_arch), i386) == 0 \ system(cpuctl identify 0 | grep -q QEMU) == 0) \ atf_tc_expect_fail(PR misc/44767); \ \
CVS commit: src/tests/lib/libc/stdio
Module Name:src Committed By: jruoho Date: Wed Apr 11 16:21:43 UTC 2012 Modified Files: src/tests/lib/libc/stdio: t_printf.c Log Message: Reduce the number of snprintf(3) invocations, as sparc/qemu timeouts. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/stdio/t_printf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/stdio/t_printf.c diff -u src/tests/lib/libc/stdio/t_printf.c:1.7 src/tests/lib/libc/stdio/t_printf.c:1.8 --- src/tests/lib/libc/stdio/t_printf.c:1.7 Sun Mar 18 08:13:57 2012 +++ src/tests/lib/libc/stdio/t_printf.c Wed Apr 11 16:21:42 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: t_printf.c,v 1.7 2012/03/18 08:13:57 jruoho Exp $ */ +/* $NetBSD: t_printf.c,v 1.8 2012/04/11 16:21:42 jruoho Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -147,7 +147,7 @@ ATF_TC_BODY(snprintf_float, tc) time(now); srand(now); - for (size_t i = 0; i 100; i++) { + for (size_t i = 0; i 1; i++) { ul = rand(); uh = rand(); u.bits = (uint64_t)uh 32 | ul;
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: christos Date: Wed Apr 11 20:21:35 UTC 2012 Modified Files: src/external/gpl3/gdb/dist/gdb: nbsd-thread.c Log Message: remove more unused SA userland thread stuff. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gdb/dist/gdb/nbsd-thread.c diff -u src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.13 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.14 --- src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.13 Wed Apr 4 09:33:19 2012 +++ src/external/gpl3/gdb/dist/gdb/nbsd-thread.c Wed Apr 11 16:21:35 2012 @@ -580,269 +580,6 @@ nbsd_thread_create_inferior (struct targ } -static int -waiter_cb (td_thread_t *th, void *s) -{ - int ret; - td_thread_info_t ti; - - if ((ret = td_thr_info (th, ti)) == 0) -{ - wrap_here (NULL); - printf_filtered ( %d, ti.thread_id); -} - - return 0; -} - -/* Worker bee for thread state command. This is a callback function that - gets called once for each user thread (ie. not kernel thread) in the - inferior. Print anything interesting that we can think of. */ - -static int -info_cb (td_thread_t *th, void *s) -{ - int ret; - td_thread_info_t ti, ti2; -#ifdef notyet - td_sync_t *ts; - td_sync_info_t tsi; -#endif - char name[32]; - - if ((ret = td_thr_info (th, ti)) == 0) -{ - if (ti.thread_type != TD_TYPE_USER) - return 0; - td_thr_getname(th, name, 32); - printf_filtered (%p: thread %4d , ti.thread_addr, ti.thread_id); - if (name[0] != '\0') - printf_filtered((%s) , name); - - switch (ti.thread_state) - { - default: - case TD_STATE_UNKNOWN: - printf_filtered (unknown state ); - break; - case TD_STATE_RUNNING: - printf_filtered (running ); - break; - case TD_STATE_RUNNABLE: - printf_filtered (active ); - break; - case TD_STATE_BLOCKED: - printf_filtered (in kernel); - break; - case TD_STATE_SLEEPING: - printf_filtered (sleeping ); - break; - case TD_STATE_ZOMBIE: - printf_filtered (zombie ); - break; - } - - if (ti.thread_state == TD_STATE_SLEEPING) - { -#ifdef notyet - td_thr_sleepinfo (th, ts); - td_sync_info (ts, tsi); - if (tsi.sync_type == TD_SYNC_JOIN) - { - td_thr_info (tsi.sync_data.join.thread, ti2); - printf (joining thread %d , ti2.thread_id); - } - else - { - printf_filtered (on %s at %p , - syncnames[tsi.sync_type], - (void *)tsi.sync_addr); - } -#endif - } - -#ifdef notyet - if (ti.thread_hasjoiners) - { - printf_filtered ((being joined by); - td_thr_join_iter (th, waiter_cb, NULL); - printf_filtered ()); - } -#endif - printf_filtered (\n); -} - else -warning (info nbsd-thread: failed to get info for thread.); - - return 0; -} - - -/* List some state about each user thread in the inferior. */ - -static void -nbsd_thread_examine_all_cmd (char *args, int from_tty) -{ - int val; - - if (nbsd_thread_active) -{ - val = td_thr_iter (main_ta, info_cb, args); - if (val != 0) - error (nbsd_thread_examine_all_cmd: td_thr_iter: %s, - td_err_string (val)); -} - else -printf_filtered (Thread debugging not active.\n); -} - -static void -nbsd_thread_examine_cmd (char *exp, int from_tty) -{ - CORE_ADDR addr; - td_thread_t *th; - int ret; - - if (!nbsd_thread_active) -{ - warning (Thread debugging not active.\n); - return; -} - - if (exp != NULL *exp != '\000') -{ - addr = parse_and_eval_address (exp); - if (from_tty) - *exp = 0; -} - else -return; - - if ((ret = td_map_pth2thr (main_ta, (pthread_t)(uintptr_t)addr, th)) != 0) -error (nbsd_thread_examine_command: td_map_pth2thr: %s, - td_err_string (ret)); - - info_cb (th, NULL); -} - - -static void -nbsd_thread_sync_cmd (char *exp, int from_tty) -{ - CORE_ADDR addr; -#ifdef notyet - td_sync_t *ts; - td_sync_info_t tsi; -#endif - td_thread_info_t ti; - int ret; - - if (!nbsd_thread_active) -{ - warning (Thread debugging not active.\n); - return; -} - - if (exp != NULL *exp != '\000') -{ - addr = parse_and_eval_address (exp); - if (from_tty) - *exp = 0; -} - else -return; - -#ifdef notyet - if ((ret = td_map_addr2sync (main_ta, (caddr_t)addr, ts)) != 0) -error (nbsd_thread_sync_cmd: td_map_addr2sync: %s, td_err_string (ret)); - - if ((ret = td_sync_info (ts, tsi)) != 0) -error (nbsd_thread_sync_cmd: td_sync_info: %s, td_err_string (ret)); - - printf_filtered (%p: %s, (void *)addr, syncnames[tsi.sync_type]); - - if (tsi.sync_type == TD_SYNC_MUTEX) -{ - if (!tsi.sync_data.mutex.locked) - printf_filtered ( unlocked); - else - { - td_thr_info (tsi.sync_data.mutex.owner, ti); - printf_filtered ( locked by thread %d,
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: christos Date: Wed Apr 11 21:39:01 UTC 2012 Modified Files: src/external/gpl3/gdb/dist/gdb: inf-ptrace.c Log Message: On NetBSD the data part of the PT_STEP request is the lid to send the signal, not the signal to send! Make it so. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gdb/dist/gdb/inf-ptrace.c diff -u src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.4 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.5 --- src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.4 Wed Mar 21 17:25:38 2012 +++ src/external/gpl3/gdb/dist/gdb/inf-ptrace.c Wed Apr 11 17:39:01 2012 @@ -366,7 +366,11 @@ inf_ptrace_resume (struct target_ops *op all possible successor instructions), so we don't have to worry about that here. */ request = PT_STEP; +#ifdef __NetBSD__ + sig = ptid_get_lwp(ptid); +#else sig = 0; +#endif } else sig = target_signal_to_host (signal);
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: christos Date: Wed Apr 11 21:41:59 UTC 2012 Modified Files: src/external/gpl3/gdb/dist/gdb: nbsd-thread.c Log Message: - In the thread activation code, mutate the main thread (lid=0) to lid=1 like the kernel does. - Remove - 1 hack - Remove more ifdef notdef code To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gdb/dist/gdb/nbsd-thread.c diff -u src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.14 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.15 --- src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.14 Wed Apr 11 16:21:35 2012 +++ src/external/gpl3/gdb/dist/gdb/nbsd-thread.c Wed Apr 11 17:41:59 2012 @@ -88,7 +88,7 @@ static void nbsd_find_new_threads (struc #define IS_LWP(ptid) (GET_LWP (ptid) != 0) -#define BUILD_LWP(lwp, ptid) ptid_build (GET_PID(ptid), (lwp) - 1, 0) +#define BUILD_LWP(lwp, ptid) ptid_build (GET_PID(ptid), (lwp), 0) static td_proc_t *main_ta; @@ -143,6 +143,7 @@ nbsd_thread_activate (void) nbsd_thread_active = 1; main_ptid = inferior_ptid; cached_thread = minus_one_ptid; + thread_change_ptid(inferior_ptid, BUILD_LWP(1, inferior_ptid)); nbsd_find_new_threads (NULL); inferior_ptid = find_active_thread (); } @@ -279,8 +280,6 @@ find_active_thread (void) while ((val != -1) (pl.pl_lwpid != 0) (pl.pl_event != PL_EVENT_SIGNAL)) val = ptrace (PT_LWPINFO, GET_PID(inferior_ptid), (void *)pl, sizeof(pl)); - if (pl.pl_lwpid == 0) - pl.pl_lwpid = 1; } else { @@ -529,9 +528,6 @@ nbsd_find_new_threads (struct target_ops { int retval; ptid_t ptid; -#ifdef notyet - td_thread_t *thread; -#endif if (nbsd_thread_active == 0) return; @@ -550,9 +546,6 @@ nbsd_find_new_threads (struct target_ops while ((retval != -1) pl.pl_lwpid != 0) { ptid = BUILD_LWP (pl.pl_lwpid, main_ptid); -#ifdef notyet - td_map_lwp2thr (main_ta, pl.pl_lwpid, thread); -#endif if (!in_thread_list (ptid)) add_thread (ptid); retval = ptrace (PT_LWPINFO, GET_PID(inferior_ptid), (void *)pl, sizeof(pl));
CVS commit: src/tools/gmp
Module Name:src Committed By: mrg Date: Thu Apr 12 01:05:32 UTC 2012 Modified Files: src/tools/gmp: Makefile Log Message: force ac_cv_path_mkdir to be set to nbinstall -d. this will avoid gmp/configure from trying to use its install-sh for mkdir -p, and should fix sourcesets created tarball builds. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tools/gmp/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gmp/Makefile diff -u src/tools/gmp/Makefile:1.1 src/tools/gmp/Makefile:1.2 --- src/tools/gmp/Makefile:1.1 Mon Jun 20 05:56:46 2011 +++ src/tools/gmp/Makefile Thu Apr 12 01:05:31 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2011/06/20 05:56:46 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2012/04/12 01:05:31 mrg Exp $ # GNUHOSTDIST= ${.CURDIR}/../../external/lgpl3/gmp/dist @@ -12,3 +12,6 @@ CONFIGURE_ARGS+=--disable-shared # when variable is used. CONFIGURE_ENV:= ${CONFIGURE_ENV:NPATH=*:NCFLAGS=*:NCXXFLAGS=*} \ PATH=${TOOLDIR:Q}/bin:PATH + +# Force avoiding possibly non-executable install-sh. +CONFIGURE_ENV+= ac_cv_path_mkdir=${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install -d
CVS commit: [matt-nb5-mips64] src/sys/uvm
Module Name:src Committed By: matt Date: Thu Apr 12 01:40:27 UTC 2012 Modified Files: src/sys/uvm [matt-nb5-mips64]: uvm_extern.h uvm_fault.c uvm_km.c uvm_meter.c uvm_pdaemon.c uvm_pdaemon.h uvm_pdpolicy.h uvm_pdpolicy_clock.c uvm_stat.c Log Message: Separate object-less anon pages out of the active list if there is no swap device. Make uvm_reclaimable and uvm.*estimatable understand colors and kmem allocations. To generate a diff of this commit: cvs rdiff -u -r1.148.4.2.4.5 -r1.148.4.2.4.6 src/sys/uvm/uvm_extern.h cvs rdiff -u -r1.125.6.1.4.4 -r1.125.6.1.4.5 src/sys/uvm/uvm_fault.c cvs rdiff -u -r1.101.4.2.4.9 -r1.101.4.2.4.10 src/sys/uvm/uvm_km.c cvs rdiff -u -r1.49.16.3 -r1.49.16.4 src/sys/uvm/uvm_meter.c cvs rdiff -u -r1.93.4.2.4.8 -r1.93.4.2.4.9 src/sys/uvm/uvm_pdaemon.c cvs rdiff -u -r1.15 -r1.15.28.1 src/sys/uvm/uvm_pdaemon.h cvs rdiff -u -r1.3.62.1 -r1.3.62.2 src/sys/uvm/uvm_pdpolicy.h cvs rdiff -u -r1.12.16.4 -r1.12.16.5 src/sys/uvm/uvm_pdpolicy_clock.c cvs rdiff -u -r1.31.12.3 -r1.31.12.4 src/sys/uvm/uvm_stat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_extern.h diff -u src/sys/uvm/uvm_extern.h:1.148.4.2.4.5 src/sys/uvm/uvm_extern.h:1.148.4.2.4.6 --- src/sys/uvm/uvm_extern.h:1.148.4.2.4.5 Thu Feb 9 03:04:59 2012 +++ src/sys/uvm/uvm_extern.h Thu Apr 12 01:40:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_extern.h,v 1.148.4.2.4.5 2012/02/09 03:04:59 matt Exp $ */ +/* $NetBSD: uvm_extern.h,v 1.148.4.2.4.6 2012/04/12 01:40:26 matt Exp $ */ /* * @@ -729,7 +729,8 @@ void uvm_aiodone_worker(struct work *, struct uvm_pggroup; void uvm_pageout_start(struct uvm_pggroup *, u_int); void uvm_pageout_done(struct vm_page *, bool); -void uvm_estimatepageable(u_int *, u_int *); +void uvm_estimatepageable(const struct uvm_pggroup *, + u_int *, u_int *); /* uvm_pglist.c */ int uvm_pglistalloc(psize_t, paddr_t, paddr_t, Index: src/sys/uvm/uvm_fault.c diff -u src/sys/uvm/uvm_fault.c:1.125.6.1.4.4 src/sys/uvm/uvm_fault.c:1.125.6.1.4.5 --- src/sys/uvm/uvm_fault.c:1.125.6.1.4.4 Wed Feb 29 18:03:38 2012 +++ src/sys/uvm/uvm_fault.c Thu Apr 12 01:40:27 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_fault.c,v 1.125.6.1.4.4 2012/02/29 18:03:38 matt Exp $ */ +/* $NetBSD: uvm_fault.c,v 1.125.6.1.4.5 2012/04/12 01:40:27 matt Exp $ */ /* * @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.125.6.1.4.4 2012/02/29 18:03:38 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.125.6.1.4.5 2012/04/12 01:40:27 matt Exp $); #include opt_uvmhist.h @@ -369,7 +369,8 @@ uvmfault_anonget(struct uvm_faultinfo *u uvmexp.fltnoram++; UVMHIST_LOG(maphist, noram -- UVM_WAIT,0, 0,0,0); -if (!uvm_reclaimable()) { +if (!uvm_reclaimable(atop(ufi-orig_rvaddr), +false)) { return ENOMEM; } uvm_wait(flt_noram1); @@ -642,7 +643,7 @@ uvmfault_promote(struct uvm_faultinfo *u uvm_page_unbusy(uobjpage, 1); uvmfault_unlockall(ufi, amap, uobj, oanon); nomem: - if (!uvm_reclaimable()) { + if (!uvm_reclaimable(atop(ufi-orig_rvaddr), false)) { UVMHIST_LOG(maphist, out of VM, 0,0,0,0); uvmexp.fltnoanon++; error = ENOMEM; @@ -1405,7 +1406,7 @@ ReFault: if (anon != oanon) mutex_exit(anon-an_lock); uvmfault_unlockall(ufi, amap, uobj, oanon); - if (!uvm_reclaimable()) { + if (!uvm_reclaimable(atop(ufi.orig_rvaddr), false)) { UVMHIST_LOG(maphist, - failed. out of VM,0,0,0,0); /* XXX instrumentation */ @@ -1790,7 +1791,7 @@ Case2: pg-flags = ~(PG_BUSY|PG_FAKE|PG_WANTED); UVM_PAGE_OWN(pg, NULL, NULL); uvmfault_unlockall(ufi, amap, uobj, anon); - if (!uvm_reclaimable()) { + if (!uvm_reclaimable(atop(ufi.orig_rvaddr), false)) { UVMHIST_LOG(maphist, - failed. out of VM,0,0,0,0); /* XXX instrumentation */ Index: src/sys/uvm/uvm_km.c diff -u src/sys/uvm/uvm_km.c:1.101.4.2.4.9 src/sys/uvm/uvm_km.c:1.101.4.2.4.10 --- src/sys/uvm/uvm_km.c:1.101.4.2.4.9 Wed Feb 29 18:03:38 2012 +++ src/sys/uvm/uvm_km.c Thu Apr 12 01:40:27 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_km.c,v 1.101.4.2.4.9 2012/02/29 18:03:38 matt Exp $ */ +/* $NetBSD: uvm_km.c,v 1.101.4.2.4.10 2012/04/12 01:40:27 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -128,7 +128,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_km.c,v 1.101.4.2.4.9 2012/02/29 18:03:38 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_km.c,v 1.101.4.2.4.10 2012/04/12 01:40:27 matt Exp $); #include opt_uvmhist.h @@ -618,7 +618,8 @@ uvm_km_alloc(struct vm_map *map, vsize_t if (__predict_false(pg == NULL)) { if ((flags UVM_KMF_NOWAIT) || - ((flags UVM_KMF_CANFAIL) !uvm_reclaimable())) { + ((flags UVM_KMF_CANFAIL) + !uvm_reclaimable(atop(offset), true))) { /* free everything! */