PERFORCE change 111266 for review
Matt Jacob
mjacob at FreeBSD.org
Thu Dec 7 15:52:58 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=111266
Change 111266 by mjacob at newisp on 2006/12/07 23:51:25
PointyHat Endian Compile Goop.
Affected files ...
.. //depot/projects/newisp/conf/NOTES#15 edit
.. //depot/projects/newisp/conf/options#9 edit
.. //depot/projects/newisp/dev/mpt/mpt.c#8 edit
.. //depot/projects/newisp/dev/mpt/mpt.h#9 edit
.. //depot/projects/newisp/geom/stripe/g_stripe.c#3 edit
.. //depot/projects/newisp/geom/stripe/g_stripe.h#2 edit
Differences ...
==== //depot/projects/newisp/conf/NOTES#15 (text+ko) ====
@@ -110,6 +110,21 @@
#
options BLKDEV_IOSIZE=8192
+#
+# MAXPHYS and DFLTPHYS
+#
+# These are the max and default 'raw' I/O block device access sizes.
+# Reads and writes will be split into DFLTPHYS chunks. Some applications
+# have better performance with larger raw I/O access sizes. Typically
+# MAXPHYS should be twice the size of DFLTPHYS. Note that certain VM
+# parameters are derived from these values and making them too large
+# can make an an unbootable kernel.
+#
+# The defaults are 64K and 128K respectively.
+options DFLTPHYS=(64*1024)
+options MAXPHYS=(128*1024)
+
+
# Options for the VM subsystem
# Deprecated options supported for backwards compatibility
#options PQ_NOOPT # No coloring
==== //depot/projects/newisp/conf/options#9 (text+ko) ====
@@ -535,6 +535,8 @@
# These cause changes all over the kernel
BLKDEV_IOSIZE opt_global.h
+MAXPHYS opt_global.h
+DFLTPHYS opt_global.h
BURN_BRIDGES opt_global.h
DEBUG opt_global.h
DEBUG_LOCKS opt_global.h
==== //depot/projects/newisp/dev/mpt/mpt.c#8 (text+ko) ====
@@ -2611,8 +2611,9 @@
mpt2host_sge_simple_union(SGE_SIMPLE_UNION *sge)
{
MPT_2_HOST32(sge, FlagsLength);
- MPT_2_HOST64(sge, u.Address64);
-};
+ MPT_2_HOST32(sge, u.Address64.Low);
+ MPT_2_HOST32(sge, u.Address64.High);
+}
void
mpt2host_iocfacts_reply(MSG_IOC_FACTS_REPLY *rp)
@@ -2664,7 +2665,7 @@
int i;
ioc2->CapabilitiesFlags = htole32(ioc2->CapabilitiesFlags);
for (i = 0; i < MPI_IOC_PAGE_2_RAID_VOLUME_MAX; i++) {
- MPT_2_HOST16(ioc2->RaidVolume[i].Reserved3);
+ MPT_2_HOST16(ioc2, RaidVolume[i].Reserved3);
}
}
@@ -2680,14 +2681,16 @@
MPT_2_HOST32(volp, Reserved2);
MPT_2_HOST32(volp, Reserved3);
for (i = 0; i < MPI_RAID_VOL_PAGE_0_PHYSDISK_MAX; i++) {
- MPT_2_HOST16(volpd, PhysDisk[i].Reserved);
+ MPT_2_HOST16(volp, PhysDisk[i].Reserved);
}
}
void
mpt2host_mpi_raid_vol_indicator(MPI_RAID_VOL_INDICATOR *vi)
{
- MPT_2_HOST16(vi, TotalBlocks);
- MPT_2_HOST16(vi, BlocksRemaining);
+ MPT_2_HOST16(vi, TotalBlocks.High);
+ MPT_2_HOST16(vi, TotalBlocks.Low);
+ MPT_2_HOST16(vi, BlocksRemaining.High);
+ MPT_2_HOST16(vi, BlocksRemaining.Low);
}
#endif
==== //depot/projects/newisp/dev/mpt/mpt.h#9 (text+ko) ====
@@ -283,20 +283,20 @@
#define HOST_2_MPT32(ptr, tag) ptr->tag = htole32(ptr->tag)
#define HOST_2_MPT16(ptr, tag) ptr->tag = htole16(ptr->tag)
-#if _BYTE_ORDER == _LITTLE_ENDIAN
+#if _BYTE_ORDER == _BIG_ENDIAN
+void mpt2host_sge_simple_union(SGE_SIMPLE_UNION *);
+void mpt2host_iocfacts_reply(MSG_IOC_FACTS_REPLY *);
+void mpt2host_portfacts_reply(MSG_PORT_FACTS_REPLY *);
+void mpt2host_config_page_ioc2(CONFIG_PAGE_IOC_2 *);
+void mpt2host_config_page_raid_vol_0(CONFIG_PAGE_RAID_VOL_0 *);
+void mpt2host_mpi_raid_vol_indicator(MPI_RAID_VOL_INDICATOR *);
+#else
#define mpt2host_sge_simple_union(x) do { ; } while (0)
#define mpt2host_iocfacts_reply(x) do { ; } while (0)
#define mpt2host_portfacts_reply(x) do { ; } while (0)
#define mpt2host_config_page_ioc2(x) do { ; } while (0)
#define mpt2host_config_page_raid_vol_0(x) do { ; } while (0)
#define mpt2host_mpi_raid_vol_indicator(x) do { ; } while (0)
-#else
-void mpt2host_sge_simple_union(SGE_SIMPLE_UNION *);
-void mpt2host_iocfacts_reply(MSG_IOC_FACTS_REPLY *);
-void mpt2host_portfacts_reply(MSG_PORT_FACTS_REPLY *);
-void mpt2host_config_page_ioc2(CONFIG_PAGE_IOC_2 *);
-void mpt2host_config_page_raid_vol_0(CONFIG_PAGE_RAID_VOL_0 *);
-void mpt2host_mpi_raid_vol_indicator(MPI_RAID_VOL_INDICATOR *);
#endif
/**************************** MPI Transaction State ***************************/
==== //depot/projects/newisp/geom/stripe/g_stripe.c#3 (text+ko) ====
@@ -839,6 +839,12 @@
gp->softc = sc;
sc->sc_geom = gp;
sc->sc_provider = NULL;
+ /*
+ * Create a devstat entry for this stripe (always unit zero).
+ * Sectorsize is system block size in this case.
+ */
+ sc->sc_devstat = devstat_new_entry(md->md_name, 0,
+ 512 /* XXX WHICH DEFINE? XXXX */ , DEVSTAT_ALL_SUPPORTED, DEVSTAT_TYPE_DIRECT, DEVSTAT_PRIORITY_MAX);
G_STRIPE_DEBUG(0, "Device %s created (id=%u).", sc->sc_name, sc->sc_id);
@@ -880,6 +886,9 @@
KASSERT(sc->sc_provider == NULL, ("Provider still exists? (device=%s)",
gp->name));
free(sc->sc_disks, M_STRIPE);
+ if (sc->sc_devstat) {
+ devstat_remove_entry(sc->sc_devstat);
+ }
free(sc, M_STRIPE);
pp = LIST_FIRST(&gp->provider);
==== //depot/projects/newisp/geom/stripe/g_stripe.h#2 (text+ko) ====
@@ -67,6 +67,7 @@
} \
} while (0)
+struct devstat;
struct g_stripe_softc {
u_int sc_type; /* provider type */
struct g_geom *sc_geom;
@@ -76,6 +77,7 @@
uint16_t sc_ndisks;
uint32_t sc_stripesize;
uint32_t sc_stripebits;
+ struct devstat *sc_devstat;
};
#define sc_name sc_geom->name
#endif /* _KERNEL */
More information about the p4-projects
mailing list