PERFORCE change 118578 for review
Ulf Lilleengen
lulf at FreeBSD.org
Sun Apr 22 12:18:06 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=118578
Change 118578 by lulf at lulf_carrot on 2007/04/22 12:17:39
- Integrate from Lukas.
Affected files ...
.. //depot/projects/soc2007/lulf/gvinum_fixup/Makefile.inc1#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/NOTES#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_plex.c#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_raid5.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_raid5.h#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/bios.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/busdma_machdep.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/identcpu.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/include/vmparam.h#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_intr.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_malloc.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/sched_ule.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/subr_rman.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/subr_witness.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/uipc_syscalls.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/vfs_mount.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/modules/Makefile#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/interrupt.h#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/mount.h#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/priv.h#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/socket.h#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/vm_contig.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/vm_param.h#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_main/sbin/gvinum/gvinum.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_main/sys/geom/vinum/geom_vinum.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_main/sys/geom/vinum/geom_vinum.h#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_main/sys/geom/vinum/geom_vinum_events.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_main/sys/geom/vinum/geom_vinum_plex.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_main/sys/geom/vinum/geom_vinum_raid5.h#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_main/sys/geom/vinum/geom_vinum_rm.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_main/sys/geom/vinum/geom_vinum_state.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_main/sys/geom/vinum/geom_vinum_var.h#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum.h#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum_drive.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum_init.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum_list.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum_move.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum_plex.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum_raid5.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum_raid5.h#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum_rename.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum_rm.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum_share.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum_share.h#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum_state.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum_subr.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum_var.h#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_kernel/geom_vinum_volume.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/Makefile#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum.h#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum_drive.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum_init.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum_list.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum_move.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum_plex.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum_raid5.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum_raid5.h#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum_rename.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum_rm.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum_share.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum_share.h#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum_state.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum_subr.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum_var.h#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/geom_vinum_volume.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/gvinum.8#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/gvinum.c#2 delete
.. //depot/projects/soc2007/lulf/gvinum_main/vinum_user/gvinum.h#2 delete
Differences ...
==== //depot/projects/soc2007/lulf/gvinum_fixup/Makefile.inc1#2 (text+ko) ====
@@ -1,5 +1,5 @@
#
-# $FreeBSD: src/Makefile.inc1,v 1.571 2007/04/06 02:13:29 pjd Exp $
+# $FreeBSD: src/Makefile.inc1,v 1.572 2007/04/17 15:52:36 pjd Exp $
#
# Make command line options:
# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
@@ -1016,11 +1016,11 @@
${_lib_libgssapi} ${_lib_libipx} \
lib/libkiconv lib/libkvm lib/libmd \
lib/ncurses/ncurses lib/ncurses/ncursesw \
- lib/libopie lib/libpam \
+ lib/libopie lib/libpam lib/libpthread \
lib/libradius lib/libsbuf lib/libtacplus lib/libutil \
${_lib_libypclnt} lib/libz lib/msun \
${_secure_lib_libcrypto} ${_secure_lib_libssh} \
- ${_secure_lib_libssl} lib/libthr
+ ${_secure_lib_libssl}
_generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/NOTES#2 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1421 2007/04/10 03:09:38 thompsa Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1422 2007/04/17 00:35:10 thompsa Exp $
#
# NOTES -- Lines that can be cut/pasted into kernel and hints configs.
#
@@ -813,7 +813,7 @@
options PPP_BSDCOMP #PPP BSD-compress support
options PPP_DEFLATE #PPP zlib/deflate/gzip support
options PPP_FILTER #enable bpf filtering (needs bpf)
-device trunk #Trunk aggregation interface
+device lagg #Link aggregation interface
device ef # Multiple ethernet frames support
options ETHER_II # enable Ethernet_II frame
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files#2 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1195 2007/04/10 00:35:31 thompsa Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1196 2007/04/17 00:35:10 thompsa Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -1527,7 +1527,7 @@
net/bpf_filter.c optional bpf | netgraph_bpf
net/bridgestp.c optional if_bridge
net/bsd_comp.c optional ppp_bsdcomp
-net/ieee8023ad_lacp.c optional trunk
+net/ieee8023ad_lacp.c optional lagg
net/if.c standard
net/if_arcsubr.c optional arcnet
net/if_atmsubr.c optional atm
@@ -1544,6 +1544,7 @@
net/if_gif.c optional gif
net/if_gre.c optional gre
net/if_iso88025subr.c optional token
+net/if_lagg.c optional lagg
net/if_loop.c optional loop
net/if_media.c standard
net/if_mib.c standard
@@ -1554,7 +1555,6 @@
net/if_stf.c optional stf
net/if_tun.c optional tun
net/if_tap.c optional tap
-net/if_trunk.c optional trunk
net/if_vlan.c optional vlan
net/netisr.c standard
net/ppp_deflate.c optional ppp_deflate
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_plex.c#3 (text+ko) ====
@@ -45,18 +45,17 @@
struct gv_raid5_packet *);
static int gv_normal_parity(struct gv_plex *, struct bio *,
struct gv_raid5_packet *);
-struct bio * gv_plexbuffer(struct gv_plex *, struct bio *, caddr_t,
- off_t, off_t, int *);
+static struct bio * gv_plexbuffer(struct gv_plex *, struct bio *, caddr_t,
+ off_t, off_t, int *);
void
gv_plex_start(struct gv_plex *p, struct bio *bp)
{
struct bio *cbp;
struct gv_sd *s;
- struct gv_raid5_packet *wp, *wp2;
- struct gv_bioq *bq, *bq2;
+ struct gv_raid5_packet *wp;
caddr_t addr;
- off_t bcount, boff;
+ off_t bcount, boff, len;
int err;
bcount = bp->bio_length;
@@ -72,75 +71,11 @@
* might involve several read/write sub-requests.
*/
if (p->org == GV_PLEX_RAID5) {
- wp = g_malloc(sizeof(*wp), M_WAITOK | M_ZERO);
- wp->bio = bp;
- TAILQ_INIT(&wp->bits);
-
- if (bp->bio_cflags & GV_BIO_REBUILD)
- err = gv_rebuild_raid5(p, wp, bp, addr,
- boff, bcount);
- else if (bp->bio_cflags & GV_BIO_CHECK)
- err = gv_check_raid5(p, wp, bp, addr,
- boff, bcount);
- else
- err = gv_raid5_request(p, wp, bp, addr,
- boff, bcount);
-
- /*
- * Building the sub-request failed, we probably need to
- * clean up a lot.
- */
- if (err) {
- printf("VINUM: plex request failed for ");
- g_print_bio(bp);
- printf("\n");
- TAILQ_FOREACH_SAFE(bq, &wp->bits, queue, bq2) {
- TAILQ_REMOVE(&wp->bits, bq, queue);
- g_free(bq);
- }
- if (wp->waiting != NULL) {
- if (wp->waiting->bio_cflags &
- GV_BIO_MALLOC)
- g_free(wp->waiting->bio_data);
- g_destroy_bio(wp->waiting);
- }
- if (wp->parity != NULL) {
- if (wp->parity->bio_cflags &
- GV_BIO_MALLOC)
- g_free(wp->parity->bio_data);
- g_destroy_bio(wp->parity);
- }
- g_free(wp);
-
- TAILQ_FOREACH_SAFE(wp, &p->packets, list, wp2) {
- if (wp->bio == bp) {
- TAILQ_REMOVE(&p->packets, wp,
- list);
- TAILQ_FOREACH_SAFE(bq,
- &wp->bits, queue, bq2) {
- TAILQ_REMOVE(&wp->bits,
- bq, queue);
- g_free(bq);
- }
- g_free(wp);
- }
- }
-
- cbp = bioq_takefirst(p->bqueue);
- while (cbp != NULL) {
- if (cbp->bio_cflags & GV_BIO_MALLOC)
- g_free(cbp->bio_data);
- g_destroy_bio(cbp);
- cbp = bioq_takefirst(p->bqueue);
- }
-
- g_io_deliver(bp, err);
+ wp = gv_raid5_start(p, bp, addr, boff, bcount);
+ if (wp == NULL)
return;
- }
- bcount -= wp->length;
- addr += wp->length;
- boff += wp->length;
+ len = wp->length;
if (TAILQ_EMPTY(&wp->bits))
g_free(wp);
@@ -163,15 +98,17 @@
return;
}
+ len = cbp->bio_length;
+
/*
* Store the sub-requests now and send them down later.
*/
bioq_insert_tail(p->bqueue, cbp);
+ }
- bcount -= cbp->bio_length;
- addr += cbp->bio_length;
- boff += cbp->bio_length;
- }
+ bcount -= len;
+ addr += len;
+ boff += len;
}
/*
@@ -199,7 +136,7 @@
}
}
-struct bio *
+static struct bio *
gv_plexbuffer(struct gv_plex *p, struct bio *bp, caddr_t addr, off_t boff, off_t bcount, int *err)
{
struct gv_sd *s;
@@ -345,13 +282,13 @@
}
TAILQ_FOREACH_SAFE(bq, &wp->bits, queue, bq2) {
- if (bq->bp == bp) {
- TAILQ_REMOVE(&wp->bits, bq, queue);
- g_free(bq);
- for (i = 0; i < wp->length; i++)
- wp->data[i] ^= bp->bio_data[i];
- break;
- }
+ if (bq->bp != bp)
+ continue;
+ TAILQ_REMOVE(&wp->bits, bq, queue);
+ g_free(bq);
+ for (i = 0; i < wp->length; i++)
+ wp->data[i] ^= bp->bio_data[i];
+ break;
}
if (TAILQ_EMPTY(&wp->bits)) {
completed = wp->length;
@@ -380,17 +317,16 @@
/* Check if we need to handle parity data. */
TAILQ_FOREACH_SAFE(bq, &wp->bits, queue, bq2) {
- if (bq->bp == bp) {
- TAILQ_REMOVE(&wp->bits, bq, queue);
- g_free(bq);
- cbp = wp->parity;
- if (cbp != NULL) {
- for (i = 0; i < wp->length; i++)
- cbp->bio_data[i] ^=
- bp->bio_data[i];
- }
- break;
+ if (bq->bp != bp)
+ continue;
+ TAILQ_REMOVE(&wp->bits, bq, queue);
+ g_free(bq);
+ cbp = wp->parity;
+ if (cbp != NULL) {
+ for (i = 0; i < wp->length; i++)
+ cbp->bio_data[i] ^= bp->bio_data[i];
}
+ break;
}
/* Handle parity data. */
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_raid5.c#2 (text+ko) ====
@@ -47,7 +47,83 @@
off_t *, off_t *, int *, int *);
static struct bio * gv_raid5_clone_bio(struct bio *, struct gv_sd *,
struct gv_raid5_packet *, caddr_t, int);
+static int gv_raid5_request(struct gv_plex *, struct gv_raid5_packet *,
+ struct bio *, caddr_t, off_t, off_t);
+static int gv_raid5_check(struct gv_plex *, struct gv_raid5_packet *,
+ struct bio *, caddr_t, off_t, off_t);
+static int gv_raid5_rebuild(struct gv_plex *, struct gv_raid5_packet *,
+ struct bio *, caddr_t, off_t, off_t);
+
+struct gv_raid5_packet *
+gv_raid5_start(struct gv_plex *p, struct bio *bp, caddr_t addr, off_t boff,
+ off_t bcount)
+{
+ struct bio *cbp;
+ struct gv_raid5_packet *wp, *wp2;
+ struct gv_bioq *bq, *bq2;
+ int err;
+
+ wp = g_malloc(sizeof(*wp), M_WAITOK | M_ZERO);
+ wp->bio = bp;
+ TAILQ_INIT(&wp->bits);
+
+ if (bp->bio_cflags & GV_BIO_REBUILD)
+ err = gv_raid5_rebuild(p, wp, bp, addr, boff, bcount);
+ else if (bp->bio_cflags & GV_BIO_CHECK)
+ err = gv_raid5_check(p, wp, bp, addr, boff, bcount);
+ else
+ err = gv_raid5_request(p, wp, bp, addr, boff, bcount);
+
+ /*
+ * Building the sub-request failed, we probably need to clean up a lot.
+ */
+ if (err) {
+ printf("VINUM: plex request failed for ");
+ g_print_bio(bp);
+ printf("\n");
+ TAILQ_FOREACH_SAFE(bq, &wp->bits, queue, bq2) {
+ TAILQ_REMOVE(&wp->bits, bq, queue);
+ g_free(bq);
+ }
+ if (wp->waiting != NULL) {
+ if (wp->waiting->bio_cflags & GV_BIO_MALLOC)
+ g_free(wp->waiting->bio_data);
+ g_destroy_bio(wp->waiting);
+ }
+ if (wp->parity != NULL) {
+ if (wp->parity->bio_cflags & GV_BIO_MALLOC)
+ g_free(wp->parity->bio_data);
+ g_destroy_bio(wp->parity);
+ }
+ g_free(wp);
+
+ TAILQ_FOREACH_SAFE(wp, &p->packets, list, wp2) {
+ if (wp->bio != bp)
+ continue;
+
+ TAILQ_REMOVE(&p->packets, wp, list);
+ TAILQ_FOREACH_SAFE(bq, &wp->bits, queue, bq2) {
+ TAILQ_REMOVE(&wp->bits, bq, queue);
+ g_free(bq);
+ }
+ g_free(wp);
+ }
+ cbp = bioq_takefirst(p->bqueue);
+ while (cbp != NULL) {
+ if (cbp->bio_cflags & GV_BIO_MALLOC)
+ g_free(cbp->bio_data);
+ g_destroy_bio(cbp);
+ cbp = bioq_takefirst(p->bqueue);
+ }
+
+ g_io_deliver(bp, err);
+ return (NULL);
+ }
+
+ return (wp);
+}
+
/*
* Check if the stripe that the work packet wants is already being used by
* some other work packet.
@@ -81,8 +157,8 @@
return (overlap);
}
-int
-gv_check_raid5(struct gv_plex *p, struct gv_raid5_packet *wp, struct bio *bp,
+static int
+gv_raid5_check(struct gv_plex *p, struct gv_raid5_packet *wp, struct bio *bp,
caddr_t addr, off_t boff, off_t bcount)
{
struct gv_sd *parity, *s;
@@ -156,8 +232,8 @@
}
/* Rebuild a degraded RAID5 plex. */
-int
-gv_rebuild_raid5(struct gv_plex *p, struct gv_raid5_packet *wp, struct bio *bp,
+static int
+gv_raid5_rebuild(struct gv_plex *p, struct gv_raid5_packet *wp, struct bio *bp,
caddr_t addr, off_t boff, off_t bcount)
{
struct gv_sd *broken, *s;
@@ -238,7 +314,7 @@
}
/* Build a request group to perform (part of) a RAID5 request. */
-int
+static int
gv_raid5_request(struct gv_plex *p, struct gv_raid5_packet *wp,
struct bio *bp, caddr_t addr, off_t boff, off_t bcount)
{
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_raid5.h#3 (text+ko) ====
@@ -39,10 +39,6 @@
caddr_t data; /* Data buffer of this sub-request- */
off_t length; /* Size of data buffer. */
off_t lockbase; /* Deny access to our plex offset. */
- off_t offset; /* The drive offset of the subdisk. */
- int bufmalloc; /* Flag if data buffer was malloced. */
- int active; /* Count of active subrequests. */
- int rqcount; /* Count of subrequests. */
struct bio *bio; /* Pointer to the original bio. */
struct bio *parity; /* The bio containing the parity data. */
@@ -52,11 +48,7 @@
TAILQ_ENTRY(gv_raid5_packet) list; /* Entry in plex's packet list. */
};
-int gv_raid5_request(struct gv_plex *, struct gv_raid5_packet *,
- struct bio *, caddr_t, off_t, off_t);
-int gv_check_raid5(struct gv_plex *, struct gv_raid5_packet *,
- struct bio *, caddr_t, off_t, off_t);
-int gv_rebuild_raid5(struct gv_plex *, struct gv_raid5_packet *,
- struct bio *, caddr_t, off_t, off_t);
+struct gv_raid5_packet * gv_raid5_start(struct gv_plex *, struct bio *,
+ caddr_t, off_t, off_t);
#endif /* !_GEOM_VINUM_RAID5_H_ */
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/bios.c#2 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/bios.c,v 1.73 2005/07/21 09:48:36 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/bios.c,v 1.74 2007/04/19 09:18:51 phk Exp $");
/*
* Code for dealing with the BIOS in x86 PC systems.
@@ -475,7 +475,8 @@
return (i);
}
-int bios_oem_strings(struct bios_oem *oem, u_char *buffer, size_t maxlen)
+int
+bios_oem_strings(struct bios_oem *oem, u_char *buffer, size_t maxlen)
{
size_t idx = 0;
struct bios_oem_signature *sig;
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/busdma_machdep.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.85 2007/03/06 18:28:42 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.86 2007/04/17 21:05:34 jhb Exp $");
#include <sys/param.h>
#include <sys/kdb.h>
@@ -51,6 +51,7 @@
#include <machine/atomic.h>
#include <machine/bus.h>
#include <machine/md_var.h>
+#include <machine/specialreg.h>
#define MAX_BPAGES 512
#define BUS_DMA_COULD_BOUNCE BUS_DMA_BUS3
@@ -530,6 +531,9 @@
} else if ((uintptr_t)*vaddr & (dmat->alignment - 1)) {
printf("bus_dmamem_alloc failed to align memory properly.\n");
}
+ if (flags & BUS_DMA_NOCACHE)
+ pmap_change_attr((vm_offset_t)*vaddr, dmat->maxsize,
+ PAT_UNCACHEABLE);
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
__func__, dmat, dmat->flags, ENOMEM);
return (0);
@@ -548,6 +552,7 @@
*/
if (map != NULL)
panic("bus_dmamem_free: Invalid map freed\n");
+ pmap_change_attr((vm_offset_t)vaddr, dmat->maxsize, PAT_WRITE_BACK);
if ((dmat->maxsize <= PAGE_SIZE) &&
(dmat->alignment < dmat->maxsize) &&
dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem))
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/identcpu.c#2 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/identcpu.c,v 1.176 2007/04/06 18:15:02 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/identcpu.c,v 1.177 2007/04/18 10:08:24 phk Exp $");
#include "opt_cpu.h"
@@ -386,6 +386,14 @@
case 0x590:
strcat(cpu_model, "K6-III");
break;
+ case 0x5a0:
+ strcat(cpu_model, "Geode LX");
+ /*
+ * Make sure the TSC runs through suspension,
+ * otherwise we can't use it as timecounter
+ */
+ wrmsr(0x1900, rdmsr(0x1900) | 0x20ULL);
+ break;
default:
strcat(cpu_model, "Unknown");
break;
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/include/vmparam.h#2 (text+ko) ====
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)vmparam.h 5.9 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/i386/include/vmparam.h,v 1.40 2007/04/06 18:15:03 ru Exp $
+ * $FreeBSD: src/sys/i386/include/vmparam.h,v 1.41 2007/04/21 01:14:48 sepotvin Exp $
*/
@@ -117,7 +117,8 @@
/*
* How many physical pages per KVA page allocated.
- * min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX)
+ * min(max(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE),
+ * VM_KMEM_SIZE_MIN), VM_KMEM_SIZE_MAX)
* is the total KVA space allocated for kmem_map.
*/
#ifndef VM_KMEM_SIZE_SCALE
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_intr.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_intr.c,v 1.142 2007/03/02 17:01:45 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_intr.c,v 1.143 2007/04/19 01:24:32 njl Exp $");
#include "opt_ddb.h"
@@ -83,7 +83,7 @@
static MALLOC_DEFINE(M_ITHREAD, "ithread", "Interrupt Threads");
-static int intr_storm_threshold = 500;
+static int intr_storm_threshold = 1000;
TUNABLE_INT("hw.intr_storm_threshold", &intr_storm_threshold);
SYSCTL_INT(_hw, OID_AUTO, intr_storm_threshold, CTLFLAG_RW,
&intr_storm_threshold, 0,
@@ -698,11 +698,11 @@
*/
if (intr_storm_threshold != 0 && ie->ie_count >= intr_storm_threshold &&
!(ie->ie_flags & IE_SOFT)) {
- if (ie->ie_warned == 0) {
+ /* Report the message only once every second. */
+ if (ppsratecheck(&ie->ie_warntm, &ie->ie_warncnt, 1)) {
printf(
- "Interrupt storm detected on \"%s\"; throttling interrupt source\n",
+ "interrupt storm detected on \"%s\"; throttling interrupt source\n",
ie->ie_name);
- ie->ie_warned = 1;
}
pause("istorm", 1);
} else
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_malloc.c#2 (text+ko) ====
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_malloc.c,v 1.156 2006/10/26 10:17:13 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_malloc.c,v 1.157 2007/04/21 01:14:48 sepotvin Exp $");
#include "opt_ddb.h"
#include "opt_vm.h"
@@ -178,6 +178,10 @@
SYSCTL_UINT(_vm, OID_AUTO, kmem_size, CTLFLAG_RD, &vm_kmem_size, 0,
"Size of kernel memory");
+u_int vm_kmem_size_min;
+SYSCTL_UINT(_vm, OID_AUTO, kmem_size_min, CTLFLAG_RD, &vm_kmem_size_min, 0,
+ "Minimum size of kernel memory");
+
u_int vm_kmem_size_max;
SYSCTL_UINT(_vm, OID_AUTO, kmem_size_max, CTLFLAG_RD, &vm_kmem_size_max, 0,
"Maximum size of kernel memory");
@@ -557,6 +561,14 @@
(mem_size / vm_kmem_size_scale) > (vm_kmem_size / PAGE_SIZE))
vm_kmem_size = (mem_size / vm_kmem_size_scale) * PAGE_SIZE;
+#if defined(VM_KMEM_SIZE_MIN)
+ vm_kmem_size_min = VM_KMEM_SIZE_MIN;
+#endif
+ TUNABLE_INT_FETCH("vm.kmem_size_min", &vm_kmem_size_min);
+ if (vm_kmem_size_min > 0 && vm_kmem_size < vm_kmem_size_min) {
+ vm_kmem_size = vm_kmem_size_min;
+ }
+
#if defined(VM_KMEM_SIZE_MAX)
vm_kmem_size_max = VM_KMEM_SIZE_MAX;
#endif
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/sched_ule.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.191 2007/03/17 23:32:48 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.192 2007/04/20 05:45:46 kmacy Exp $");
#include "opt_hwpmc_hooks.h"
#include "opt_sched.h"
@@ -1859,8 +1859,7 @@
CTR2(KTR_ULE, "ithd %d < %d",
td->td_priority, PRI_MAX_ITHD);
ts->ts_cpu = cpuid;
- }
- if (pick_pri)
+ } else if (pick_pri)
ts->ts_cpu = tdq_pickpri(tdq, ts, flags);
else
ts->ts_cpu = tdq_pickidle(tdq, ts);
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/subr_rman.c#2 (text+ko) ====
@@ -55,8 +55,10 @@
* permitted.
*/
+#include "opt_ddb.h"
+
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/subr_rman.c,v 1.55 2007/02/23 22:53:56 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/subr_rman.c,v 1.56 2007/04/16 21:09:03 jhb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -70,6 +72,10 @@
#include <sys/rman.h>
#include <sys/sysctl.h>
+#ifdef DDB
+#include <ddb/ddb.h>
+#endif
+
/*
* We use a linked list rather than a bitmap because we need to be able to
* represent potentially huge objects (like all of a processor's physical
@@ -911,3 +917,47 @@
SYSCTL_NODE(_hw_bus, OID_AUTO, rman, CTLFLAG_RD, sysctl_rman,
"kernel resource manager");
+
+#ifdef DDB
+static void
+dump_rman(struct rman *rm)
+{
+ struct resource_i *r;
+ const char *devname;
+
+ if (db_pager_quit)
+ return;
+ db_printf("rman: %s\n", rm->rm_descr);
+ db_printf(" 0x%lx-0x%lx (full range)\n", rm->rm_start, rm->rm_end);
+ TAILQ_FOREACH(r, &rm->rm_list, r_link) {
+ if (r->r_dev != NULL) {
+ devname = device_get_nameunit(r->r_dev);
+ if (devname == NULL)
+ devname = "nomatch";
+ } else
+ devname = NULL;
+ db_printf(" 0x%lx-0x%lx ", r->r_start, r->r_end);
+ if (devname != NULL)
+ db_printf("(%s)\n", devname);
+ else
+ db_printf("----\n");
+ if (db_pager_quit)
+ return;
+ }
+}
+
+DB_SHOW_COMMAND(rman, db_show_rman)
+{
+
+ if (have_addr)
+ dump_rman((struct rman *)addr);
+}
+
+DB_SHOW_COMMAND(allrman, db_show_all_rman)
+{
+ struct rman *rm;
+
+ TAILQ_FOREACH(rm, &rman_head, rm_link)
+ dump_rman(rm);
+}
+#endif
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/subr_witness.c#2 (text+ko) ====
@@ -82,9 +82,10 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/subr_witness.c,v 1.229 2007/04/05 23:32:32 pjd Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/subr_witness.c,v 1.230 2007/04/19 08:02:51 jkoshy Exp $");
#include "opt_ddb.h"
+#include "opt_hwpmc_hooks.h"
#include "opt_witness.h"
#include <sys/param.h>
@@ -289,6 +290,9 @@
{ "session", &lock_class_mtx_sleep },
{ "uidinfo hash", &lock_class_mtx_sleep },
{ "uidinfo struct", &lock_class_mtx_sleep },
+#ifdef HWPMC_HOOKS
+ { "pmc-sleep", &lock_class_mtx_sleep },
+#endif
{ NULL, NULL },
/*
* Sockets
@@ -396,6 +400,9 @@
{ "zstty", &lock_class_mtx_spin },
{ "fast_taskqueue", &lock_class_mtx_spin },
{ "intr table", &lock_class_mtx_spin },
+#ifdef HWPMC_HOOKS
+ { "pmc-per-proc", &lock_class_mtx_spin },
+#endif
{ "sleepq chain", &lock_class_mtx_spin },
{ "sched lock", &lock_class_mtx_spin },
{ "turnstile chain", &lock_class_mtx_spin },
@@ -434,6 +441,9 @@
{ "tw_cl_io_lock", &lock_class_mtx_spin },
{ "tw_cl_intr_lock", &lock_class_mtx_spin },
{ "tw_cl_gen_lock", &lock_class_mtx_spin },
+#ifdef HWPMC_HOOKS
+ { "pmc-leaf", &lock_class_mtx_spin },
+#endif
{ NULL, NULL },
{ NULL, NULL }
};
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/uipc_syscalls.c#2 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.251 2007/04/06 23:31:30 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.253 2007/04/20 19:49:20 pjd Exp $");
#include "opt_sctp.h"
#include "opt_compat.h"
@@ -2016,12 +2016,12 @@
*/
pgoff = (vm_offset_t)(off & PAGE_MASK);
xfsize = omin(PAGE_SIZE - pgoff,
- obj->un_pager.vnp.vnp_size - off -
+ obj->un_pager.vnp.vnp_size - uap->offset -
sbytes - loopbytes);
if (uap->nbytes)
rem = (uap->nbytes - sbytes - loopbytes);
else
- rem = obj->un_pager.vnp.vnp_size - off -
+ rem = obj->un_pager.vnp.vnp_size - uap->offset -
sbytes - loopbytes;
xfsize = omin(rem, xfsize);
if (xfsize <= 0) {
@@ -2038,35 +2038,15 @@
VM_OBJECT_UNLOCK(obj);
break;
}
-retry_lookup:
+
/*
* Attempt to look up the page.
* Allocate if not found or
* wait and loop if busy.
*/
pindex = OFF_TO_IDX(off);
- pg = vm_page_lookup(obj, pindex);
- if (pg == NULL) {
- pg = vm_page_alloc(obj, pindex,
- VM_ALLOC_NOBUSY | VM_ALLOC_NORMAL |
- VM_ALLOC_WIRED);
- if (pg == NULL) {
- VM_OBJECT_UNLOCK(obj);
- VM_WAIT;
- VM_OBJECT_LOCK(obj);
- goto retry_lookup;
- }
- } else if (vm_page_sleep_if_busy(pg, TRUE, "sfpbsy"))
- goto retry_lookup;
- else {
- /*
- * Wire the page so it does not get
- * ripped out from under us.
- */
- vm_page_lock_queues();
- vm_page_wire(pg);
- vm_page_unlock_queues();
- }
+ pg = vm_page_grab(obj, pindex, VM_ALLOC_NOBUSY |
+ VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_RETRY);
/*
* Check if page is valid for what we need,
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/vfs_mount.c#2 (text+ko) ====
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/vfs_mount.c,v 1.257 2007/04/13 23:54:22 pjd Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/vfs_mount.c,v 1.258 2007/04/17 21:14:06 pjd Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -80,8 +80,6 @@
static int vfs_domount(struct thread *td, const char *fstype,
char *fspath, int fsflags, void *fsdata);
-static struct mount *vfs_mount_alloc(struct vnode *dvp, struct vfsconf *vfsp,
- const char *fspath, struct thread *td);
static int vfs_mountroot_ask(void);
static int vfs_mountroot_try(const char *mountfrom);
static int vfs_donmount(struct thread *td, int fsflags,
@@ -465,7 +463,7 @@
/*
* Allocate and initialize the mount point struct.
*/
-static struct mount *
+struct mount *
vfs_mount_alloc(struct vnode *vp, struct vfsconf *vfsp,
const char *fspath, struct thread *td)
{
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/modules/Makefile#2 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/modules/Makefile,v 1.527 2007/04/10 00:41:31 thompsa Exp $
+# $FreeBSD: src/sys/modules/Makefile,v 1.528 2007/04/17 00:35:10 thompsa Exp $
.include <bsd.own.mk>
@@ -108,12 +108,12 @@
if_faith \
if_gif \
if_gre \
+ if_lagg \
${_if_ndis} \
if_ppp \
if_sl \
if_stf \
if_tap \
- if_trunk \
if_tun \
if_vlan \
${_iir} \
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/interrupt.h#2 (text+ko) ====
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/sys/interrupt.h,v 1.35 2007/02/23 12:19:07 piso Exp $
+ * $FreeBSD: src/sys/sys/interrupt.h,v 1.36 2007/04/19 01:24:32 njl Exp $
*/
#ifndef _SYS_INTERRUPT_H_
@@ -74,7 +74,8 @@
void (*ie_enable)(void *);
int ie_flags;
int ie_count; /* Loop counter. */
- int ie_warned; /* Warned about interrupt storm. */
+ int ie_warncnt; /* Rate-check interrupt storm warns. */
+ struct timeval ie_warntm;
};
/* Interrupt event flags kept in ie_flags. */
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/mount.h#2 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)mount.h 8.21 (Berkeley) 5/20/95
- * $FreeBSD: src/sys/sys/mount.h,v 1.224 2007/04/05 21:03:05 pjd Exp $
+ * $FreeBSD: src/sys/sys/mount.h,v 1.225 2007/04/17 21:14:05 pjd Exp $
*/
#ifndef _SYS_MOUNT_H_
@@ -682,6 +682,8 @@
void vfs_mountedfrom(struct mount *, const char *from);
void vfs_ref(struct mount *);
void vfs_rel(struct mount *);
+struct mount *vfs_mount_alloc(struct vnode *, struct vfsconf *, const char *,
+ struct thread *);
int vfs_suser(struct mount *, struct thread *);
void vfs_unbusy(struct mount *, struct thread *);
void vfs_unmountall(void);
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/priv.h#2 (text+ko) ====
@@ -26,7 +26,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/sys/priv.h,v 1.10 2007/04/10 15:58:38 rwatson Exp $
+ * $FreeBSD: src/sys/sys/priv.h,v 1.11 2007/04/17 00:35:10 thompsa Exp $
*/
/*
@@ -319,7 +319,7 @@
#define PRIV_NET_IFDESTROY 412 /* Destroy cloned interface. */
#define PRIV_NET_ADDIFADDR 413 /* Add protocol addr to interface. */
#define PRIV_NET_DELIFADDR 414 /* Delete protocol addr on interface. */
-#define PRIV_NET_TRUNK 415 /* Administer trunk. */
+#define PRIV_NET_LAGG 415 /* Administer lagg interface. */
/*
* 802.11-related privileges.
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/socket.h#2 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)socket.h 8.4 (Berkeley) 2/21/94
- * $FreeBSD: src/sys/sys/socket.h,v 1.92 2006/11/03 15:23:16 rrs Exp $
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list