MFC - tracking update.

This commit is contained in:
Mark Murray 2013-10-02 18:12:18 +00:00
commit 86bf1afda6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/random_number_generator/; revision=255998
12 changed files with 136 additions and 99 deletions

View File

@ -1673,7 +1673,7 @@ delete-old-files:
# the Makefile parser segfault.
@exec 3<&0; \
${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
-V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | sort -r | \
-V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \
while read file; do \
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
@ -1738,7 +1738,7 @@ check-old-libs:
delete-old-dirs:
@echo ">>> Removing old directories"
@${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
-V OLD_DIRS | xargs -n1 | \
-V OLD_DIRS | xargs -n1 | sort -r | \
while read dir; do \
if [ -d "${DESTDIR}/$${dir}" ]; then \
rmdir -v "${DESTDIR}/$${dir}" || true; \

View File

@ -141,6 +141,25 @@ typedef struct tcpinfo {
struct tcphdr *tcp_hdr; /* raw TCP header */
} tcpinfo_t;
/*
* A clone of tcpinfo_t used to handle the fact that the TCP input path
* overwrites some fields of the TCP header with their host-order equivalents.
* Unfortunately, DTrace doesn't let us simply typedef a new name for struct
* tcpinfo and define a separate translator for it.
*/
typedef struct tcpinfoh {
uint16_t tcp_sport; /* source port */
uint16_t tcp_dport; /* destination port */
uint32_t tcp_seq; /* sequence number */
uint32_t tcp_ack; /* acknowledgment number */
uint8_t tcp_offset; /* data offset, in bytes */
uint8_t tcp_flags; /* flags */
uint16_t tcp_window; /* window size */
uint16_t tcp_checksum; /* checksum */
uint16_t tcp_urgent; /* urgent data pointer */
struct tcphdr *tcp_hdr; /* raw TCP header */
} tcpinfoh_t;
#pragma D binding "1.0" translator
translator csinfo_t < struct tcpcb *p > {
cs_addr = NULL;
@ -180,7 +199,7 @@ translator tcpsinfo_t < struct tcpcb *p > {
tcps_sack_snxt = p == NULL ? 0 : p->sack_newdata;
tcps_rto = p == NULL ? -1 : p->t_rxtcur / 1000; /* XXX */
tcps_mss = p == NULL ? -1 : p->t_maxseg;
tcps_retransmit = -1; /* XXX */
tcps_retransmit = p == NULL ? -1 : p->t_rxtshift > 0 ? 1 : 0;
};
#pragma D binding "1.0" translator
@ -197,6 +216,25 @@ translator tcpinfo_t < struct tcphdr *p > {
tcp_hdr = (struct tcphdr *)p;
};
/*
* This translator differs from the one for tcpinfo_t in that the sequence
* number, acknowledgement number, window size and urgent pointer are already
* in host order and thus don't need to be converted.
*/
#pragma D binding "1.0" translator
translator tcpinfoh_t < struct tcphdr *p > {
tcp_sport = p == NULL ? 0 : ntohs(p->th_sport);
tcp_dport = p == NULL ? 0 : ntohs(p->th_dport);
tcp_seq = p == NULL ? -1 : p->th_seq;
tcp_ack = p == NULL ? -1 : p->th_ack;
tcp_offset = p == NULL ? -1 : (p->th_off >> 2);
tcp_flags = p == NULL ? 0 : p->th_flags;
tcp_window = p == NULL ? 0 : (p->th_win);
tcp_checksum = p == NULL ? 0 : ntohs(p->th_sum);
tcp_urgent = p == NULL ? 0 : p->th_urp;
tcp_hdr = (struct tcphdr *)p;
};
#pragma D binding "1.0" translator
translator tcplsinfo_t < int s > {
tcps_state = s;

View File

@ -557,6 +557,10 @@ static bfd *reldyn_sorting_bfd;
#define MIPS_ELF_DYN_SIZE(abfd) \
(get_elf_backend_data (abfd)->s->sizeof_dyn)
/* The size of the rld_map pointer. */
#define MIPS_ELF_RLD_MAP_SIZE(abfd) \
(get_elf_backend_data (abfd)->s->arch_size / 8)
/* The size of a GOT entry. */
#define MIPS_ELF_GOT_SIZE(abfd) \
(get_elf_backend_data (abfd)->s->arch_size / 8)
@ -7492,7 +7496,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
{
/* We add a room for __rld_map. It will be filled in by the
rtld to contain a pointer to the _r_debug structure. */
s->size += 4;
s->size += MIPS_ELF_RLD_MAP_SIZE (output_bfd);
}
else if (SGI_COMPAT (output_bfd)
&& CONST_STRNEQ (name, ".compact_rel"))

View File

@ -125,6 +125,15 @@ FixupLEAPass::postRAConvertToLEA(MachineFunction::iterator &MFI,
// which requires isImm() to be true
return 0;
}
break;
case X86::ADD16rr:
case X86::ADD16rr_DB:
if (MI->getOperand(1).getReg() != MI->getOperand(2).getReg()) {
// if src1 != src2, then convertToThreeAddress will
// need to create a Virtual register, which we cannot do
// after register allocation.
return 0;
}
}
return TII->convertToThreeAddress(MFI, MBBI, 0);
}

View File

@ -28,7 +28,7 @@
.\" @(#)accept.2 8.2 (Berkeley) 12/11/93
.\" $FreeBSD$
.\"
.Dd May 1, 2013
.Dd October 1, 2013
.Dt ACCEPT 2
.Os
.Sh NAME
@ -155,13 +155,20 @@ For some applications, performance may be enhanced by using an
.Xr accept_filter 9
to pre-process incoming connections.
.Pp
Portable programs should not rely on the
When using
.Fn accept ,
portable programs should not rely on the
.Dv O_NONBLOCK
and
.Dv O_ASYNC
properties and the signal destination being inherited,
but should set them explicitly using
.Xr fcntl 2 .
.Xr fcntl 2 ;
.Fn accept4
sets these properties consistently,
but may not be fully portable across
.Ux
platforms.
.Sh RETURN VALUES
These calls return \-1 on error.
If they succeed, they return a non-negative

View File

@ -1111,11 +1111,7 @@ digest_dynamic1(Obj_Entry *obj, int early, const Elf_Dyn **dyn_rpath,
break;
case DT_MIPS_RLD_MAP:
#ifdef notyet
if (!early)
dbg("Filling in DT_DEBUG entry");
((Elf_Dyn*)dynp)->d_un.d_ptr = (Elf_Addr) &r_debug;
#endif
*((Elf_Addr *)(dynp->d_un.d_ptr)) = (Elf_Addr) &r_debug;
break;
#endif

View File

@ -263,22 +263,23 @@ FreeBSD 5.2 | | | |
| | | | | | | | OpenBSD 5.2 DragonFly 3.2.1
| FreeBSD | | | | | NetBSD | |
| 9.1 | | | | | 5.2 | |
| | | | | | | | |
| | | | | | NetBSD | |
| | | | | | 5.2.1 | |
| | | | | | | |
| | | | | \ | |
| | | | | NetBSD | |
| | | | | 6.0.1 | |
| | | | | | OpenBSD 5.3 DragonFly 3.4.1
| | | | | NetBSD | |
| | | | | 6.0.2 | |
| | | | | | |
| | | | `-NetBSD 6.1 | |
| FreeBSD | | | |
| 8.4 | | | |
| | | | |
| | | | |
| | | | | | | | | |
| | | | | | | NetBSD | |
| | | | | | | 5.2.1 | |
| | | | | | | | |
| | | | | | \ | |
| | | | | | NetBSD | |
| | | | | | 6.0.1 | |
| | | | | | | OpenBSD 5.3 DragonFly 3.4.1
| | | | | | NetBSD | |
| | | | | | 6.0.2 | |
| | | | | | | |
| | | | | `-NetBSD 6.1 | |
| | FreeBSD | | | |
| | 8.4 | | | |
| | | | | |
| FreeBSD | | | |
| 9.2 | | | |
| | | | |
FreeBSD 10 -current | NetBSD -current OpenBSD -current |
| | | | |
@ -589,6 +590,7 @@ NetBSD 6.1 2013-05-18 [NBD]
FreeBSD 8.4 2013-06-07 [FBD]
NetBSD 5.1.3 2013-09-29 [NBD]
NetBSD 5.2.1 2013-09-29 [NBD]
FreeBSD 9.2 2013-09-30 [FBD]
Bibliography
------------------------

View File

@ -227,7 +227,7 @@ powerpc/ps3/ps3_syscons.c optional ps3 sc
powerpc/ps3/ps3-hvcall.S optional ps3 sc
powerpc/pseries/phyp-hvcall.S optional pseries powerpc64
powerpc/pseries/mmu_phyp.c optional pseries powerpc64
powerpc/pseries/phyp_console.c optional pseries powerpc64
powerpc/pseries/phyp_console.c optional pseries powerpc64 uart
powerpc/pseries/phyp_vscsi.c optional pseries powerpc64 scbus
powerpc/pseries/platform_chrp.c optional pseries
powerpc/pseries/plpar_iommu.c optional pseries powerpc64

View File

@ -113,8 +113,8 @@ static void vfs_setdirty_locked_object(struct buf *bp);
static void vfs_vmio_release(struct buf *bp);
static int vfs_bio_clcheck(struct vnode *vp, int size,
daddr_t lblkno, daddr_t blkno);
static int buf_flush(struct vnode *vp, int);
static int flushbufqueues(struct vnode *, int, int);
static int buf_flush(int);
static int flushbufqueues(int, int);
static void buf_daemon(void);
static void bremfreel(struct buf *bp);
static __inline void bd_wakeup(void);
@ -2048,7 +2048,7 @@ getnewbuf_bufd_help(struct vnode *vp, int gbflags, int slpflag, int slptimeo,
{
struct thread *td;
char *waitmsg;
int fl, flags, norunbuf;
int cnt, error, flags, norunbuf, wait;
mtx_assert(&bqclean, MA_OWNED);
@ -2072,10 +2072,13 @@ getnewbuf_bufd_help(struct vnode *vp, int gbflags, int slpflag, int slptimeo,
return;
td = curthread;
cnt = 0;
wait = MNT_NOWAIT;
mtx_lock(&nblock);
while (needsbuffer & flags) {
if (vp != NULL && (td->td_pflags & TDP_BUFNEED) == 0) {
mtx_unlock(&nblock);
/*
* getblk() is called with a vnode locked, and
* some majority of the dirty buffers may as
@ -2084,15 +2087,20 @@ getnewbuf_bufd_help(struct vnode *vp, int gbflags, int slpflag, int slptimeo,
* cannot be achieved by the buf_daemon, that
* cannot lock the vnode.
*/
norunbuf = ~(TDP_BUFNEED | TDP_NORUNNINGBUF) |
(td->td_pflags & TDP_NORUNNINGBUF);
/* play bufdaemon */
td->td_pflags |= TDP_BUFNEED | TDP_NORUNNINGBUF;
fl = buf_flush(vp, flushbufqtarget);
td->td_pflags &= norunbuf;
if (cnt++ > 2)
wait = MNT_WAIT;
ASSERT_VOP_LOCKED(vp, "bufd_helper");
error = VOP_ISLOCKED(vp) == LK_EXCLUSIVE ? 0 :
vn_lock(vp, LK_TRYUPGRADE);
if (error == 0) {
/* play bufdaemon */
norunbuf = curthread_pflags_set(TDP_BUFNEED |
TDP_NORUNNINGBUF);
VOP_FSYNC(vp, wait, td);
atomic_add_long(&notbufdflushes, 1);
curthread_pflags_restore(norunbuf);
}
mtx_lock(&nblock);
if (fl != 0)
continue;
if ((needsbuffer & flags) == 0)
break;
}
@ -2510,20 +2518,18 @@ static struct kproc_desc buf_kp = {
SYSINIT(bufdaemon, SI_SUB_KTHREAD_BUF, SI_ORDER_FIRST, kproc_start, &buf_kp);
static int
buf_flush(struct vnode *vp, int target)
buf_flush(int target)
{
int flushed;
flushed = flushbufqueues(vp, target, 0);
flushed = flushbufqueues(target, 0);
if (flushed == 0) {
/*
* Could not find any buffers without rollback
* dependencies, so just write the first one
* in the hopes of eventually making progress.
*/
if (vp != NULL && target > 2)
target /= 2;
flushbufqueues(vp, target, 1);
flushed = flushbufqueues(target, 1);
}
return (flushed);
}
@ -2560,7 +2566,7 @@ buf_daemon()
* the I/O system.
*/
while (numdirtybuffers > lodirty) {
if (buf_flush(NULL, numdirtybuffers - lodirty) == 0)
if (buf_flush(numdirtybuffers - lodirty) == 0)
break;
kern_yield(PRI_USER);
}
@ -2615,7 +2621,7 @@ SYSCTL_INT(_vfs, OID_AUTO, flushwithdeps, CTLFLAG_RW, &flushwithdeps,
0, "Number of buffers flushed with dependecies that require rollbacks");
static int
flushbufqueues(struct vnode *lvp, int target, int flushdeps)
flushbufqueues(int target, int flushdeps)
{
struct buf *sentinel;
struct vnode *vp;
@ -2625,7 +2631,6 @@ flushbufqueues(struct vnode *lvp, int target, int flushdeps)
int flushed;
int queue;
int error;
bool unlock;
flushed = 0;
queue = QUEUE_DIRTY;
@ -2634,27 +2639,24 @@ flushbufqueues(struct vnode *lvp, int target, int flushdeps)
sentinel->b_qindex = QUEUE_SENTINEL;
mtx_lock(&bqdirty);
TAILQ_INSERT_HEAD(&bufqueues[queue], sentinel, b_freelist);
mtx_unlock(&bqdirty);
while (flushed != target) {
maybe_yield();
mtx_lock(&bqdirty);
bp = TAILQ_NEXT(sentinel, b_freelist);
if (bp != NULL) {
TAILQ_REMOVE(&bufqueues[queue], sentinel, b_freelist);
TAILQ_INSERT_AFTER(&bufqueues[queue], bp, sentinel,
b_freelist);
} else
} else {
mtx_unlock(&bqdirty);
break;
/*
* Skip sentinels inserted by other invocations of the
* flushbufqueues(), taking care to not reorder them.
*/
if (bp->b_qindex == QUEUE_SENTINEL)
continue;
/*
* Only flush the buffers that belong to the
* vnode locked by the curthread.
*/
if (lvp != NULL && bp->b_vp != lvp)
continue;
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL) != 0)
}
KASSERT(bp->b_qindex != QUEUE_SENTINEL,
("parallel calls to flushbufqueues() bp %p", bp));
error = BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL);
mtx_unlock(&bqdirty);
if (error != 0)
continue;
if (bp->b_pin_count > 0) {
BUF_UNLOCK(bp);
@ -2670,11 +2672,9 @@ flushbufqueues(struct vnode *lvp, int target, int flushdeps)
continue;
}
if (bp->b_flags & B_INVAL) {
bremfreel(bp);
mtx_unlock(&bqdirty);
bremfreef(bp);
brelse(bp);
flushed++;
mtx_lock(&bqdirty);
continue;
}
@ -2701,45 +2701,23 @@ flushbufqueues(struct vnode *lvp, int target, int flushdeps)
BUF_UNLOCK(bp);
continue;
}
if (lvp == NULL) {
unlock = true;
error = vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT);
} else {
ASSERT_VOP_LOCKED(vp, "getbuf");
unlock = false;
error = VOP_ISLOCKED(vp) == LK_EXCLUSIVE ? 0 :
vn_lock(vp, LK_TRYUPGRADE);
}
error = vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT);
if (error == 0) {
mtx_unlock(&bqdirty);
CTR3(KTR_BUF, "flushbufqueue(%p) vp %p flags %X",
bp, bp->b_vp, bp->b_flags);
if (curproc == bufdaemonproc)
vfs_bio_awrite(bp);
else {
bremfree(bp);
bwrite(bp);
notbufdflushes++;
}
vfs_bio_awrite(bp);
vn_finished_write(mp);
if (unlock)
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp, 0);
flushwithdeps += hasdeps;
flushed++;
/*
* Sleeping on runningbufspace while holding
* vnode lock leads to deadlock.
*/
if (curproc == bufdaemonproc &&
runningbufspace > hirunningspace)
if (runningbufspace > hirunningspace)
waitrunningbufspace();
mtx_lock(&bqdirty);
continue;
}
vn_finished_write(mp);
BUF_UNLOCK(bp);
}
mtx_lock(&bqdirty);
TAILQ_REMOVE(&bufqueues[queue], sentinel, b_freelist);
mtx_unlock(&bqdirty);
free(sentinel, M_TEMP);

View File

@ -2892,9 +2892,12 @@ vn_printf(struct vnode *vp, const char *fmt, ...)
if (mtx_owned(VI_MTX(vp)))
printf(" VI_LOCKed");
if (vp->v_object != NULL)
printf(" v_object %p ref %d pages %d\n",
printf(" v_object %p ref %d pages %d "
"cleanbuf %d dirtybuf %d\n",
vp->v_object, vp->v_object->ref_count,
vp->v_object->resident_page_count);
vp->v_object->resident_page_count,
vp->v_bufobj.bo_dirty.bv_cnt,
vp->v_bufobj.bo_clean.bv_cnt);
printf(" ");
lockmgr_printinfo(vp->v_vnlock);
if (vp->v_data != NULL)

View File

@ -51,7 +51,7 @@ options FFS #Berkeley Fast Filesystem
options SOFTUPDATES #Enable FFS soft updates support
options UFS_ACL #Support for access control lists
options UFS_DIRHASH #Improve performance on big directories
options ROOTDEVNAME=\"ufs:ada0s1a\"
options ROOTDEVNAME=\"ufs:ada0\"
# Debugging for use in -current

View File

@ -60,7 +60,7 @@ SDT_PROBE_DEFINE5_XLATE(tcp, , , accept_established, accept-established,
"struct tcpcb *", "csinfo_t *",
"uint8_t *", "ipinfo_t *",
"struct tcpcb *", "tcpsinfo_t *" ,
"struct tcphdr *", "tcpinfo_t *");
"struct tcphdr *", "tcpinfoh_t *");
SDT_PROBE_DEFINE5_XLATE(tcp, , , accept_refused, accept-refused,
"void *", "pktinfo_t *",
@ -74,14 +74,14 @@ SDT_PROBE_DEFINE5_XLATE(tcp, , , connect_established, connect-established,
"struct tcpcb *", "csinfo_t *",
"uint8_t *", "ipinfo_t *",
"struct tcpcb *", "tcpsinfo_t *" ,
"struct tcphdr *", "tcpinfo_t *");
"struct tcphdr *", "tcpinfoh_t *");
SDT_PROBE_DEFINE5_XLATE(tcp, , , connect_refused, connect-refused,
"void *", "pktinfo_t *",
"struct tcpcb *", "csinfo_t *",
"uint8_t *", "ipinfo_t *",
"struct tcpcb *", "tcpsinfo_t *" ,
"struct tcphdr *", "tcpinfo_t *");
"struct tcphdr *", "tcpinfoh_t *");
SDT_PROBE_DEFINE5_XLATE(tcp, , , connect_request, connect-request,
"void *", "pktinfo_t *",
@ -95,7 +95,7 @@ SDT_PROBE_DEFINE5_XLATE(tcp, , , receive, receive,
"struct tcpcb *", "csinfo_t *",
"uint8_t *", "ipinfo_t *",
"struct tcpcb *", "tcpsinfo_t *" ,
"struct tcphdr *", "tcpinfo_t *");
"struct tcphdr *", "tcpinfoh_t *");
SDT_PROBE_DEFINE5_XLATE(tcp, , , send, send,
"void *", "pktinfo_t *",