svn commit: r264310 - head/sys/kern

2014-04-09 Thread David Xu
Author: davidxu Date: Thu Apr 10 02:30:51 2014 New Revision: 264310 URL: http://svnweb.freebsd.org/changeset/base/264310 Log: Add kqueue support for devctl. Reviewed by: kib,mjg Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ==

svn commit: r264114 - head/sys/kern

2014-04-04 Thread David Xu
Author: davidxu Date: Fri Apr 4 12:31:13 2014 New Revision: 264114 URL: http://svnweb.freebsd.org/changeset/base/264114 Log: Fix SIGIO delivery. Use fsetown() to handle file descriptor owner ioctl and use pgsigio() to send SIGIO. Submitted by: truckman Reviewed by: mjg Modified: he

Re: svn commit: r263755 - head/sys/kern

2014-03-29 Thread David Xu
On 2014/03/29 23:42, Warner Losh wrote: On Mar 29, 2014, at 6:31 AM, David Xu wrote: On 2014/03/29 15:52, Don Lewis wrote: On 29 Mar, Mateusz Guzik wrote: On Sat, Mar 29, 2014 at 11:52:09AM +0800, David Xu wrote: If fsetown handling like this is insecure this would bite us in that

Re: svn commit: r263755 - head/sys/kern

2014-03-29 Thread David Xu
On 2014/03/29 15:52, Don Lewis wrote: On 29 Mar, Mateusz Guzik wrote: On Sat, Mar 29, 2014 at 11:52:09AM +0800, David Xu wrote: If fsetown handling like this is insecure this would bite us in that scenario (and few others). In short, if we can avoid giving another way to corrupt stuff in the

Re: svn commit: r263755 - head/sys/kern

2014-03-28 Thread David Xu
On 2014/03/29 12:14, Mateusz Guzik wrote: I asked if multpiple concurrent calls to fsetown(.., &pointer) could result in some corruption in the kernel - if they could, we would have a problem in the future. I decided to read the code once more and fsetown seems to be safe in this regard after

Re: svn commit: r263755 - head/sys/kern

2014-03-28 Thread David Xu
On 2014/03/29 11:25, Mateusz Guzik wrote: On Sat, Mar 29, 2014 at 11:09:34AM +0800, David Xu wrote: On 2014/03/29 10:56, Mateusz Guzik wrote: But this patch would mean that current consumers (if any) would break - just calling FIOASYNC would not result in receiving SIGIO. The old behavior is

Re: svn commit: r263755 - head/sys/kern

2014-03-28 Thread David Xu
On 2014/03/29 10:56, Mateusz Guzik wrote: On Fri, Mar 28, 2014 at 09:13:20AM -0700, Don Lewis wrote: On 28 Mar, David Xu wrote: I have tweaked it a bit, is this okay ? # HG changeset patch # Parent 53b614ff2cae108f27e4475989d3a86997017268 diff -r 53b614ff2cae sys/kern/subr_bus.c --- a/sys

Re: svn commit: r263755 - head/sys/kern

2014-03-28 Thread David Xu
On 2014/03/29 00:13, Don Lewis wrote: On 28 Mar, David Xu wrote: On 2014/03/28 06:31, Don Lewis wrote: On 27 Mar, Konstantin Belousov wrote: On Thu, Mar 27, 2014 at 04:05:12PM +0100, Mateusz Guzik wrote: On Thu, Mar 27, 2014 at 03:58:19PM +0100, Mateusz Guzik wrote: On Thu, Mar 27, 2014 at

Re: svn commit: r263755 - head/sys/kern

2014-03-27 Thread David Xu
On 2014/03/28 06:31, Don Lewis wrote: On 27 Mar, Konstantin Belousov wrote: On Thu, Mar 27, 2014 at 04:05:12PM +0100, Mateusz Guzik wrote: On Thu, Mar 27, 2014 at 03:58:19PM +0100, Mateusz Guzik wrote: On Thu, Mar 27, 2014 at 04:46:57PM +0800, David Xu wrote: On 2014/03/27 16:37, Mateusz

Re: svn commit: r263755 - head/sys/kern

2014-03-27 Thread David Xu
On 2014/03/28 06:31, Don Lewis wrote: On 27 Mar, Konstantin Belousov wrote: On Thu, Mar 27, 2014 at 04:05:12PM +0100, Mateusz Guzik wrote: On Thu, Mar 27, 2014 at 03:58:19PM +0100, Mateusz Guzik wrote: On Thu, Mar 27, 2014 at 04:46:57PM +0800, David Xu wrote: On 2014/03/27 16:37, Mateusz

Re: svn commit: r263755 - head/sys/kern

2014-03-27 Thread David Xu
On 2014/03/27 22:58, Mateusz Guzik wrote: On Thu, Mar 27, 2014 at 04:46:57PM +0800, David Xu wrote: On 2014/03/27 16:37, Mateusz Guzik wrote: On Thu, Mar 27, 2014 at 03:45:17PM +0800, David Xu wrote: I think the async process pointer can be cleared when a process exits by registering an event

Re: svn commit: r263755 - head/sys/kern

2014-03-27 Thread David Xu
On 2014/03/27 16:37, Mateusz Guzik wrote: On Thu, Mar 27, 2014 at 03:45:17PM +0800, David Xu wrote: I think the async process pointer can be cleared when a process exits by registering an event handler. please see attached patch. Sure, but I'm not very fond of this solution. This

Re: svn commit: r263755 - head/sys/kern

2014-03-27 Thread David Xu
On 2014/03/26 07:30, Mateusz Guzik wrote: Author: mjg Date: Tue Mar 25 23:30:35 2014 New Revision: 263755 URL: http://svnweb.freebsd.org/changeset/base/263755 Log: Document a known problem with handling the process intended to receive SIGIO in /dev/devctl. Suggested by:adrian

svn commit: r263258 - stable/10/lib/libc/gen

2014-03-16 Thread David Xu
Author: davidxu Date: Mon Mar 17 05:03:53 2014 New Revision: 263258 URL: http://svnweb.freebsd.org/changeset/base/263258 Log: MFC r263107: To avoid missing a chance to cancel thread, call _pthread_testcancel at the beginning of _sem_timedwait. Submitted by: Eric van Gyzen < eric at v

svn commit: r263255 - stable/9/lib/libc/gen

2014-03-16 Thread David Xu
Author: davidxu Date: Mon Mar 17 02:10:45 2014 New Revision: 263255 URL: http://svnweb.freebsd.org/changeset/base/263255 Log: MFC r263107: To avoid missing a chance to cancel thread, call _pthread_testcancel at the beginning of _sem_timedwait. Submitted by: Eric van Gyzen < eric at v

svn commit: r263107 - head/lib/libc/gen

2014-03-12 Thread David Xu
Author: davidxu Date: Thu Mar 13 06:54:10 2014 New Revision: 263107 URL: http://svnweb.freebsd.org/changeset/base/263107 Log: To avoid missing a chance to cancel thread, call _pthread_testcancel at the beginning of _sem_timedwait. Submitted by: Eric van Gyzen < eric at vangyzen dot net >

svn commit: r262545 - stable/9/libexec/rtld-elf

2014-02-26 Thread David Xu
Author: davidxu Date: Thu Feb 27 02:41:41 2014 New Revision: 262545 URL: http://svnweb.freebsd.org/changeset/base/262545 Log: MFC r262277: malloc_aligned() may not leave enough space for pointer to allocated memory, saving the pointer will overwrite bytes belongs to another memory block

svn commit: r262544 - stable/10/libexec/rtld-elf

2014-02-26 Thread David Xu
Author: davidxu Date: Thu Feb 27 02:36:09 2014 New Revision: 262544 URL: http://svnweb.freebsd.org/changeset/base/262544 Log: MFC r262277: malloc_aligned() may not leave enough space for pointer to allocated memory, saving the pointer will overwrite bytes belongs to another memory block

svn commit: r262334 - head/libexec/rtld-elf

2014-02-22 Thread David Xu
Author: davidxu Date: Sat Feb 22 11:06:48 2014 New Revision: 262334 URL: http://svnweb.freebsd.org/changeset/base/262334 Log: Increase alignment to size of pointer if the alignment is too small. Some modules do not align data at least to size of pointer, they uses a smaller alignment, but ou

svn commit: r262277 - head/libexec/rtld-elf

2014-02-20 Thread David Xu
Author: davidxu Date: Fri Feb 21 03:36:16 2014 New Revision: 262277 URL: http://svnweb.freebsd.org/changeset/base/262277 Log: malloc_aligned() may not leave enough space for pointer to allocated memory, saving the pointer will overwrite bytes belongs to another memory block unexpectly, to fi

svn commit: r254399 - in stable/9/sys: compat/freebsd32 kern sys

2013-08-15 Thread David Xu
Author: davidxu Date: Fri Aug 16 06:42:24 2013 New Revision: 254399 URL: http://svnweb.freebsd.org/changeset/base/254399 Log: Regen. Modified: stable/9/sys/compat/freebsd32/freebsd32_proto.h stable/9/sys/compat/freebsd32/freebsd32_syscall.h stable/9/sys/compat/freebsd32/freebsd32_syscalls

svn commit: r254398 - in stable/9: include lib/libc/gen lib/libc/sys lib/libthr/thread sys/compat/freebsd32 sys/kern sys/sys

2013-08-15 Thread David Xu
puclockid.c) @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2012 David Xu . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above cop

Re: svn commit: r251886 - in head: contrib/apr contrib/apr-util contrib/serf contrib/sqlite3 contrib/subversion share/mk usr.bin usr.bin/svn usr.bin/svn/lib usr.bin/svn/lib/libapr usr.bin/svn/lib/liba

2013-06-18 Thread David Xu
On 2013/06/19 13:50, Alexey Dokuchaev wrote: On Tue, Jun 18, 2013 at 03:47:44PM -0400, Garance A Drosehn wrote: Note that a major change to the FreeBSD repo would require that users install a new 'svn' anyway, even if they did install 'svn' back when they first installed FreeBSD. IMO, I think t

svn commit: r250691 - head/lib/libthr/thread

2013-05-15 Thread David Xu
Author: davidxu Date: Thu May 16 03:01:04 2013 New Revision: 250691 URL: http://svnweb.freebsd.org/changeset/base/250691 Log: Return one-based key so that user can check if the key is ever allocated in the first place. Initial patch submitted by: phk Modified: head/lib/libthr/thread/th

svn commit: r250402 - head/lib/libthr/thread

2013-05-08 Thread David Xu
Author: davidxu Date: Thu May 9 04:41:03 2013 New Revision: 250402 URL: http://svnweb.freebsd.org/changeset/base/250402 Log: Fix return value for setcontext and swapcontext. Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c ===

Re: svn commit: r249605 - head/sys/vm

2013-05-01 Thread David Xu
the driver /sys/dev/if_msk.c reports watchdog timeout, backing out this change works again for me. Regards, David Xu ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-s

svn commit: r250013 - head/lib/libthr/thread

2013-04-27 Thread David Xu
Author: davidxu Date: Sun Apr 28 03:13:45 2013 New Revision: 250013 URL: http://svnweb.freebsd.org/changeset/base/250013 Log: Remove extra code for SA_RESETHAND, it is not needed because kernel has already done this. Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thre

svn commit: r249607 - head/lib/libthr/thread

2013-04-17 Thread David Xu
Author: davidxu Date: Thu Apr 18 05:58:07 2013 New Revision: 249607 URL: http://svnweb.freebsd.org/changeset/base/249607 Log: Remove debug code. Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c =

svn commit: r249606 - head/lib/libthr/thread

2013-04-17 Thread David Xu
Author: davidxu Date: Thu Apr 18 05:56:00 2013 New Revision: 249606 URL: http://svnweb.freebsd.org/changeset/base/249606 Log: Avoid copying memory if SIGCANCEL is not masked. Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c ===

svn commit: r249604 - head/lib/libthr/thread

2013-04-17 Thread David Xu
Author: davidxu Date: Thu Apr 18 05:12:11 2013 New Revision: 249604 URL: http://svnweb.freebsd.org/changeset/base/249604 Log: Revert revision 249323, the PR/177624 is confusing, that bug is caused by using buggy getcontext/setcontext on same stack, while swapcontext normally works on differe

svn commit: r249323 - head/lib/libthr/thread

2013-04-09 Thread David Xu
Author: davidxu Date: Wed Apr 10 02:40:03 2013 New Revision: 249323 URL: http://svnweb.freebsd.org/changeset/base/249323 Log: swapcontext wrapper can not be implemented in C, the stack pointer saved in the context becomes invalid when the function returns, same as setjmp, it must be implemen

svn commit: r246894 - head/lib/libc/gen

2013-02-16 Thread David Xu
Author: davidxu Date: Sun Feb 17 02:52:42 2013 New Revision: 246894 URL: http://svnweb.freebsd.org/changeset/base/246894 Log: Make more code be protected by internal mutex, and now it is fork-safe, in error case, the file exclusive lock is now released as soon as possible, in previous code,

svn commit: r246872 - head/lib/libc/gen

2013-02-15 Thread David Xu
Author: davidxu Date: Sat Feb 16 06:07:07 2013 New Revision: 246872 URL: http://svnweb.freebsd.org/changeset/base/246872 Log: Simplify code by using flag O_EXLOCK. PR: kern/175674 Modified: head/lib/libc/gen/sem_new.c Modified: head/lib/libc/gen/sem_new.c ===

svn commit: r245761 - head/gnu/usr.bin/grep

2013-01-21 Thread David Xu
Author: davidxu Date: Tue Jan 22 03:23:14 2013 New Revision: 245761 URL: http://svnweb.freebsd.org/changeset/base/245761 Log: Make "-D skip" option work with FIFO by opening file in non-blocking mode. Reviewed by: jhb Tested by:delphij Modified: head/gnu/usr.bin/grep/grep.c Modif

svn commit: r245036 - head/sys/kern

2013-01-04 Thread David Xu
Author: davidxu Date: Fri Jan 4 11:11:12 2013 New Revision: 245036 URL: http://svnweb.freebsd.org/changeset/base/245036 Log: Revert revision 244760 because strncpy pads trailing space with zero, this prevents kernel data from being leaked. Noticed by: Joerg Sonnenberger < joerg at britan

svn commit: r244760 - head/sys/kern

2012-12-27 Thread David Xu
Author: davidxu Date: Fri Dec 28 02:43:33 2012 New Revision: 244760 URL: http://svnweb.freebsd.org/changeset/base/244760 Log: Use strlcpy to NULL-terminate error message even if user provided a short buffer. Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ==

svn commit: r244695 - head/sys/dev/pci

2012-12-26 Thread David Xu
Author: davidxu Date: Wed Dec 26 13:07:17 2012 New Revision: 244695 URL: http://svnweb.freebsd.org/changeset/base/244695 Log: Always initialize pattern_buf pointers to NULL, otherwise AMD64 machine panics with: free: address xxx(yyy) has not been allocated. it can be triggered by hald.

svn commit: r243938 - head/sys/kern

2012-12-05 Thread David Xu
Author: davidxu Date: Thu Dec 6 06:29:08 2012 New Revision: 243938 URL: http://svnweb.freebsd.org/changeset/base/243938 Log: Eliminate superfluous code. Modified: head/sys/kern/subr_uio.c Modified: head/sys/kern/subr_uio.c

svn commit: r243702 - stable/9/sys/kern

2012-11-29 Thread David Xu
Author: davidxu Date: Fri Nov 30 05:30:31 2012 New Revision: 243702 URL: http://svnweb.freebsd.org/changeset/base/243702 Log: MFC r243599: Take first active vnode correctly. Modified: stable/9/sys/kern/vfs_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sy

Re: svn commit: r243599 - head/sys/kern

2012-11-27 Thread David Xu
On 2012/11/27 21:52, Attilio Rao wrote: > On Tue, Nov 27, 2012 at 6:07 AM, David Xu wrote: >> Author: davidxu >> Date: Tue Nov 27 06:07:58 2012 >> New Revision: 243599 >> URL: http://svnweb.freebsd.org/changeset/base/243599 >> >> Log: >> Take first a

svn commit: r243615 - head/sys/net

2012-11-27 Thread David Xu
Author: davidxu Date: Tue Nov 27 12:23:57 2012 New Revision: 243615 URL: http://svnweb.freebsd.org/changeset/base/243615 Log: Pass allocated unit number to make_dev, otherwise kernel panics later while cloning second tap. Reviewed by: kevlo,ed Modified: head/sys/net/if_tap.c Modified:

svn commit: r243599 - head/sys/kern

2012-11-26 Thread David Xu
Author: davidxu Date: Tue Nov 27 06:07:58 2012 New Revision: 243599 URL: http://svnweb.freebsd.org/changeset/base/243599 Log: Take first active vnode correctly. Reviewed by: kib MFC after:3 days Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ===

svn commit: r240297 - head/include

2012-09-09 Thread David Xu
Author: davidxu Date: Mon Sep 10 05:12:45 2012 New Revision: 240297 URL: http://svn.freebsd.org/changeset/base/240297 Log: POSIX requires sigevent to be visible after mqueue.h is included. Modified: head/include/mqueue.h Modified: head/include/mqueue.h ===

svn commit: r240296 - head/include

2012-09-09 Thread David Xu
Author: davidxu Date: Mon Sep 10 05:09:39 2012 New Revision: 240296 URL: http://svn.freebsd.org/changeset/base/240296 Log: Process CPU-Time Clocks option is supported, define _POSIX_CPUTIME. Modified: head/include/unistd.h Modified: head/include/unistd.h =

svn commit: r240295 - head/include

2012-09-09 Thread David Xu
Author: davidxu Date: Mon Sep 10 05:00:29 2012 New Revision: 240295 URL: http://svn.freebsd.org/changeset/base/240295 Log: Add missing prototype for clock_getcpuclockid. Modified: head/include/time.h Modified: head/include/time.h ==

svn commit: r239718 - head/lib/libthr/thread

2012-08-26 Thread David Xu
Author: davidxu Date: Mon Aug 27 03:09:39 2012 New Revision: 239718 URL: http://svn.freebsd.org/changeset/base/239718 Log: In suspend_common(), don't wait for a thread which is in creation, because pthread_suspend_all_np() may have already suspended its parent thread. Add locking code in pth

svn commit: r239609 - head/lib/libthr/thread

2012-08-22 Thread David Xu
Author: davidxu Date: Thu Aug 23 05:15:15 2012 New Revision: 239609 URL: http://svn.freebsd.org/changeset/base/239609 Log: Eliminate redundant code, _thr_spinlock_init() has already been called in init_private(), don't call it again in fork() wrapper. Modified: head/lib/libthr/thread/thr_fo

svn commit: r239486 - in head: lib/libc/gen share/man/man3

2012-08-21 Thread David Xu
uclockid.3 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/clock_getcpuclockid.3 Tue Aug 21 09:18:28 2012 (r239486) @@ -0,0 +1,95 @@ +.\" Copyright (c) 2012 David Xu +.\"

svn commit: r239485 - head/lib/libc/gen

2012-08-21 Thread David Xu
Author: davidxu Date: Tue Aug 21 09:17:13 2012 New Revision: 239485 URL: http://svn.freebsd.org/changeset/base/239485 Log: Fix prototype. Also the function should return error code instead of -1 on error. Modified: head/lib/libc/gen/clock_getcpuclockid.c Modified: head/lib/libc/gen/clock_g

svn commit: r239349 - in head/sys: compat/freebsd32 kern sys

2012-08-16 Thread David Xu
Author: davidxu Date: Fri Aug 17 02:47:16 2012 New Revision: 239349 URL: http://svn.freebsd.org/changeset/base/239349 Log: regen. Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/c

svn commit: r239347 - in head: lib/libc/gen lib/libc/sys lib/libthr/thread sys/compat/freebsd32 sys/kern sys/sys

2012-08-16 Thread David Xu
+1,39 @@ +/* + * Copyright (c) 2012 David Xu . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright

svn commit: r239206 - head/lib/libthr/thread

2012-08-11 Thread David Xu
Author: davidxu Date: Sun Aug 12 00:56:56 2012 New Revision: 239206 URL: http://svn.freebsd.org/changeset/base/239206 Log: Do defered mutex wakeup once. Modified: head/lib/libthr/thread/thr_cond.c Modified: head/lib/libthr/thread/thr_cond.c ===

svn commit: r239202 - head/sys/kern

2012-08-11 Thread David Xu
Author: davidxu Date: Sat Aug 11 23:48:39 2012 New Revision: 239202 URL: http://svn.freebsd.org/changeset/base/239202 Log: Some style fixes inspired by @bde. Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ==

svn commit: r239200 - head/lib/libthr/thread

2012-08-11 Thread David Xu
Author: davidxu Date: Sat Aug 11 23:17:02 2012 New Revision: 239200 URL: http://svn.freebsd.org/changeset/base/239200 Log: MFp4: Further decreases unexpected context switches by defering mutex wakeup until internal sleep queue lock is released. Modified: head/lib/libthr/thread/thr_cond.c

svn commit: r239187 - head/sys/kern

2012-08-10 Thread David Xu
Author: davidxu Date: Sat Aug 11 00:06:56 2012 New Revision: 239187 URL: http://svn.freebsd.org/changeset/base/239187 Log: tvtohz will print out an error message if a negative value is given to it, avoid this problem by detecting timeout earlier. Reported by: pho Modified: head/sys/ker

Re: svn commit: r238936 - in head/sys: fs/fifofs kern sys

2012-08-02 Thread David Xu
On 2012/8/2 22:17, Bruce Evans wrote: On Thu, 2 Aug 2012, David Xu wrote: On 2012/8/2 16:12, Bruce Evans wrote: ... I made similar patches for sockets (to set POLLHUP on hangup (now in -current) and to not set POLLIN on hangup unless there is still data to be read). I started killing

Re: svn commit: r238936 - in head/sys: fs/fifofs kern sys

2012-08-02 Thread David Xu
On 2012/8/2 16:12, Bruce Evans wrote: On Thu, 2 Aug 2012, David Xu wrote: On 2012/8/2 3:29, Bruce Evans wrote: On Wed, 1 Aug 2012, Giovanni Trematerra wrote: ... [gianni@bombay] /usr/src/tools/regression/poll#./pipepoll 1..20 not ok 17 FIFO state 6a: expected POLLHUP; got POLLIN | POLLHUP

Re: svn commit: r238936 - in head/sys: fs/fifofs kern sys

2012-08-01 Thread David Xu
On 2012/8/2 3:29, Bruce Evans wrote: On Wed, 1 Aug 2012, Giovanni Trematerra wrote: On Tue, Jul 31, 2012 at 10:21 AM, David Xu wrote: ... The old code broke some history semantic of FIFO pipe, you can try the test tool /usr/src/tools/regression/poll/pipepoll, try it before and after my

Re: svn commit: r238936 - in head/sys: fs/fifofs kern sys

2012-07-31 Thread David Xu
On 2012/7/31 15:22, Giovanni Trematerra wrote: On Tue, Jul 31, 2012 at 7:48 AM, David Xu wrote: Author: davidxu Date: Tue Jul 31 05:48:35 2012 New Revision: 238936 URL: http://svn.freebsd.org/changeset/base/238936 Log: I am comparing current pipe code with the one in 8.3-STABLE r236165

svn commit: r238936 - in head/sys: fs/fifofs kern sys

2012-07-30 Thread David Xu
Author: davidxu Date: Tue Jul 31 05:48:35 2012 New Revision: 238936 URL: http://svn.freebsd.org/changeset/base/238936 Log: I am comparing current pipe code with the one in 8.3-STABLE r236165, I found 8.3 is a history BSD version using socket to implement FIFO pipe, it uses per-file seqcount

svn commit: r238928 - in head/sys: fs/fifofs kern sys

2012-07-30 Thread David Xu
Author: davidxu Date: Tue Jul 31 02:00:37 2012 New Revision: 238928 URL: http://svn.freebsd.org/changeset/base/238928 Log: When a thread is blocked in direct write state, it only sets PIPE_DIRECTW flag but not PIPE_WANTW, but FIFO pipe code does not understand this internal state, when a FIF

Re: svn commit: r238828 - head/sys/sys

2012-07-27 Thread David Xu
On 2012/7/27 21:30, Bruce Evans wrote: On Fri, 27 Jul 2012, Gleb Smirnoff wrote: On Fri, Jul 27, 2012 at 10:32:55PM +1000, Bruce Evans wrote: B> I just noticed that there is a technical problem -- the count is read B> unlocked in the KASSERT. And since the comparision is for equality, B> if yo

svn commit: r238762 - stable/8/lib/libthr/thread

2012-07-24 Thread David Xu
Author: davidxu Date: Wed Jul 25 02:09:06 2012 New Revision: 238762 URL: http://svn.freebsd.org/changeset/base/238762 Log: Use target thread's scheduling policy not current's. Modified: stable/8/lib/libthr/thread/thr_setprio.c Modified: stable/8/lib/libthr/thread/thr_setprio.c ==

svn commit: r238761 - stable/8/lib/libthr/thread

2012-07-24 Thread David Xu
Author: davidxu Date: Wed Jul 25 02:05:59 2012 New Revision: 238761 URL: http://svn.freebsd.org/changeset/base/238761 Log: Release a reference count in case priority needn't to be changed. Modified: stable/8/lib/libthr/thread/thr_setschedparam.c Modified: stable/8/lib/libthr/thread/thr_set

svn commit: r238760 - stable/8/lib/libthr/thread

2012-07-24 Thread David Xu
Author: davidxu Date: Wed Jul 25 01:57:53 2012 New Revision: 238760 URL: http://svn.freebsd.org/changeset/base/238760 Log: Revert r238715, the revision breaks firefox. Reported by: dougb Modified: stable/8/lib/libthr/thread/thr_setprio.c (contents, props changed) stable/8/lib/libthr/

svn commit: r238715 - stable/8/lib/libthr/thread

2012-07-23 Thread David Xu
Author: davidxu Date: Mon Jul 23 09:34:19 2012 New Revision: 238715 URL: http://svn.freebsd.org/changeset/base/238715 Log: Merge r238637,r238640,r238641,r238642: r238637 | davidxu | 2012-07-20 09:56:14 +0800 (Fri, 20

svn commit: r238714 - stable/9/lib/libthr/thread

2012-07-23 Thread David Xu
Author: davidxu Date: Mon Jul 23 09:33:31 2012 New Revision: 238714 URL: http://svn.freebsd.org/changeset/base/238714 Log: Merge r238637,r238640,r238641,r238642: r238637 | davidxu | 2012-07-20 09:56:14 +0800 (Fri, 20

svn commit: r238645 - head/lib/libthr/thread

2012-07-19 Thread David Xu
Author: davidxu Date: Fri Jul 20 05:47:12 2012 New Revision: 238645 URL: http://svn.freebsd.org/changeset/base/238645 Log: Don't forget to initialize return value. Modified: head/lib/libthr/thread/thr_getschedparam.c Modified: head/lib/libthr/thread/thr_getschedparam.c ==

svn commit: r238644 - head/lib/libthr/thread

2012-07-19 Thread David Xu
Author: davidxu Date: Fri Jul 20 03:37:19 2012 New Revision: 238644 URL: http://svn.freebsd.org/changeset/base/238644 Log: Simplify code by replacing _thr_ref_add() with _thr_find_thread(). Modified: head/lib/libthr/thread/thr_info.c Modified: head/lib/libthr/thread/thr_info.c ==

svn commit: r238643 - head/lib/libthr/thread

2012-07-19 Thread David Xu
Author: davidxu Date: Fri Jul 20 03:27:07 2012 New Revision: 238643 URL: http://svn.freebsd.org/changeset/base/238643 Log: Eliminate duplicated code. Modified: head/lib/libthr/thread/thr_getschedparam.c Modified: head/lib/libthr/thread/thr_getschedparam.c

svn commit: r238642 - head/lib/libthr/thread

2012-07-19 Thread David Xu
Author: davidxu Date: Fri Jul 20 03:22:17 2012 New Revision: 238642 URL: http://svn.freebsd.org/changeset/base/238642 Log: Don't assign same value. Modified: head/lib/libthr/thread/thr_setprio.c head/lib/libthr/thread/thr_setschedparam.c Modified: head/lib/libthr/thread/thr_setprio.c =

svn commit: r238641 - head/lib/libthr/thread

2012-07-19 Thread David Xu
Author: davidxu Date: Fri Jul 20 03:16:52 2012 New Revision: 238641 URL: http://svn.freebsd.org/changeset/base/238641 Log: Eliminate duplicated code. Modified: head/lib/libthr/thread/thr_setprio.c Modified: head/lib/libthr/thread/thr_setprio.c

svn commit: r238640 - head/lib/libthr/thread

2012-07-19 Thread David Xu
Author: davidxu Date: Fri Jul 20 03:00:41 2012 New Revision: 238640 URL: http://svn.freebsd.org/changeset/base/238640 Log: Eliminate duplicated code. Modified: head/lib/libthr/thread/thr_setschedparam.c Modified: head/lib/libthr/thread/thr_setschedparam.c

svn commit: r238637 - head/lib/libthr/thread

2012-07-19 Thread David Xu
Author: davidxu Date: Fri Jul 20 01:56:14 2012 New Revision: 238637 URL: http://svn.freebsd.org/changeset/base/238637 Log: Don't forget to release a thread reference count, replace _thr_ref_add() with _thr_find_thread(), so reference count is no longer needed. MFC after:3 days Modi

svn commit: r238541 - stable/8/lib/libc/i386/gen

2012-07-16 Thread David Xu
Author: davidxu Date: Tue Jul 17 02:02:40 2012 New Revision: 238541 URL: http://svn.freebsd.org/changeset/base/238541 Log: MFC r238328: Executing CPUID with EAX set to 1 to actually get feature flags. PR: 169730 Modified: stable/8/lib/libc/i386/gen/getcontextx.c Directory Properties:

svn commit: r238513 - stable/9/lib/libc/i386/gen

2012-07-15 Thread David Xu
Author: davidxu Date: Mon Jul 16 02:10:26 2012 New Revision: 238513 URL: http://svn.freebsd.org/changeset/base/238513 Log: MFC r238328: Executing CPUID with EAX set to 1 to actually get feature flags. PR: 169730 Approved by:re (kib) Modified: stable/9/lib/libc/i386/gen/getcon

svn commit: r238336 - head/sys/kern

2012-07-09 Thread David Xu
Author: davidxu Date: Tue Jul 10 05:45:13 2012 New Revision: 238336 URL: http://svn.freebsd.org/changeset/base/238336 Log: Always clear p_xthread if current thread no longer needs it, in theory, if debugger exited without calling ptrace(PT_DETACH), there is a time window that the p_xthread m

svn commit: r238328 - head/lib/libc/i386/gen

2012-07-09 Thread David Xu
Author: davidxu Date: Tue Jul 10 01:47:11 2012 New Revision: 238328 URL: http://svn.freebsd.org/changeset/base/238328 Log: Executing CPUID with EAX set to 1 to actually get feature flags. PR: 169730 Modified: head/lib/libc/i386/gen/getcontextx.c Modified: head/lib/libc/i386/gen/getcontex

svn commit: r238287 - head/sys/kern

2012-07-09 Thread David Xu
Author: davidxu Date: Mon Jul 9 09:24:46 2012 New Revision: 238287 URL: http://svn.freebsd.org/changeset/base/238287 Log: If you have pressed CTRL+Z and a process is suspended, then you use gdb to attach to the process, it is surprising that the process is resumed without inputting any gdb

Re: svn commit: r237660 - head/lib/libc/gen

2012-06-28 Thread David Xu
On 2012/06/28 21:52, Kostik Belousov wrote: On Thu, Jun 28, 2012 at 4:00 PM, David Xu wrote: On 2012/6/28 16:49, David Xu wrote: On 2012/6/28 15:53, Konstantin Belousov wrote: On Thu, Jun 28, 2012 at 10:53:03AM +0800, David Xu wrote: On 2012/6/28 10:32, Attilio Rao wrote: 2012/6/28, David

Re: svn commit: r237660 - head/lib/libc/gen

2012-06-28 Thread David Xu
On 2012/6/28 16:49, David Xu wrote: On 2012/6/28 15:53, Konstantin Belousov wrote: On Thu, Jun 28, 2012 at 10:53:03AM +0800, David Xu wrote: On 2012/6/28 10:32, Attilio Rao wrote: 2012/6/28, David Xu: On 2012/6/28 10:21, Attilio Rao wrote: 2012/6/28, David Xu: On 2012/6/28 4:32, Konstantin

Re: svn commit: r237660 - head/lib/libc/gen

2012-06-28 Thread David Xu
On 2012/6/28 15:53, Konstantin Belousov wrote: On Thu, Jun 28, 2012 at 10:53:03AM +0800, David Xu wrote: On 2012/6/28 10:32, Attilio Rao wrote: 2012/6/28, David Xu: On 2012/6/28 10:21, Attilio Rao wrote: 2012/6/28, David Xu: On 2012/6/28 4:32, Konstantin Belousov wrote: Author: kib Date

Re: svn commit: r237660 - head/lib/libc/gen

2012-06-27 Thread David Xu
On 2012/6/28 10:32, Attilio Rao wrote: 2012/6/28, David Xu: On 2012/6/28 10:21, Attilio Rao wrote: 2012/6/28, David Xu: On 2012/6/28 4:32, Konstantin Belousov wrote: Author: kib Date: Wed Jun 27 20:32:45 2012 New Revision: 237660 URL: http://svn.freebsd.org/changeset/base/237660 Log

Re: svn commit: r237660 - head/lib/libc/gen

2012-06-27 Thread David Xu
On 2012/6/28 10:21, Attilio Rao wrote: 2012/6/28, David Xu: On 2012/6/28 4:32, Konstantin Belousov wrote: Author: kib Date: Wed Jun 27 20:32:45 2012 New Revision: 237660 URL: http://svn.freebsd.org/changeset/base/237660 Log: Optimize the handling of SC_NPROCESSORS_CONF, by using auxv

Re: svn commit: r237660 - head/lib/libc/gen

2012-06-27 Thread David Xu
return ((long)value); mib[0] = CTL_HW; mib[1] = HW_NCPU; break; Will this make controlling the number of CPU online or CPU hotplug be impossible on FreeBSD ? Regards, David Xu ___ svn-src-all@freebsd.org mailing list

Re: svn commit: r236935 - head/sys/kern

2012-06-12 Thread David Xu
and the only caller always passes 0 as low. Given that, how about the following: http://people.freebsd.org/~mjg/patches/fd_last_used-cleanup.patch Looks good too. Updated in similar manner: http://people.freebsd.org/~mjg/patches/fd_last_used-cleanup2.patch I ha

Re: svn commit: r236935 - head/sys/kern

2012-06-12 Thread David Xu
On 2012/6/12 6:05, Pawel Jakub Dawidek wrote: Author: pjd Date: Mon Jun 11 22:05:26 2012 New Revision: 236935 URL: http://svn.freebsd.org/changeset/base/236935 Log: fdgrowtable() no longer drops the filedesc lock so it is enough to retry finding free file descriptor only once after fdgrowt

svn commit: r236276 - stable/8/lib/libthr/thread

2012-05-29 Thread David Xu
Author: davidxu Date: Wed May 30 01:54:14 2012 New Revision: 236276 URL: http://svn.freebsd.org/changeset/base/236276 Log: MFC r236135: Return EBUSY for PTHREAD_MUTEX_ADAPTIVE_NP too when the mutex could not be acquired. PR: 168317 Modified: stable/8/lib/libthr/thread/thr_mutex.

svn commit: r236275 - stable/9/lib/libthr/thread

2012-05-29 Thread David Xu
Author: davidxu Date: Wed May 30 01:52:53 2012 New Revision: 236275 URL: http://svn.freebsd.org/changeset/base/236275 Log: MFC r236135: Return EBUSY for PTHREAD_MUTEX_ADAPTIVE_NP too when the mutex could not be acquired. PR: 168317 Modified: stable/9/lib/libthr/thread/thr_mutex.

svn commit: r236135 - head/lib/libthr/thread

2012-05-26 Thread David Xu
Author: davidxu Date: Sun May 27 01:24:51 2012 New Revision: 236135 URL: http://svn.freebsd.org/changeset/base/236135 Log: Return EBUSY for PTHREAD_MUTEX_ADAPTIVE_NP too when the mutex could not be acquired. PR: 168317 MFC after:3 days Modified: head/lib/libthr/thread/thr_mutex

svn commit: r235714 - head/gnu/usr.bin/gdb/libgdb

2012-05-20 Thread David Xu
Author: davidxu Date: Mon May 21 03:06:31 2012 New Revision: 235714 URL: http://svn.freebsd.org/changeset/base/235714 Log: Print key value, an index, otherwise we don't know which key is allocated. Modified: head/gnu/usr.bin/gdb/libgdb/fbsd-threads.c Modified: head/gnu/usr.bin/gdb/libgdb/fbs

svn commit: r235218 - head/lib/libthr/thread

2012-05-10 Thread David Xu
Author: davidxu Date: Thu May 10 09:30:37 2012 New Revision: 235218 URL: http://svn.freebsd.org/changeset/base/235218 Log: Create a common function lookup() to search a chan, this eliminates redundant SC_LOOKUP() calling. Modified: head/lib/libthr/thread/thr_sleepq.c Modified: head/lib/lib

svn commit: r235068 - head/lib/libthr/thread

2012-05-05 Thread David Xu
Author: davidxu Date: Sat May 5 23:51:24 2012 New Revision: 235068 URL: http://svn.freebsd.org/changeset/base/235068 Log: Fix mis-merged line, move SC_LOOKUP() call to upper level. Modified: head/lib/libthr/thread/thr_sleepq.c Modified: head/lib/libthr/thread/thr_sleepq.c

svn commit: r234947 - head/lib/libthr/thread

2012-05-03 Thread David Xu
Author: davidxu Date: Thu May 3 09:17:31 2012 New Revision: 234947 URL: http://svn.freebsd.org/changeset/base/234947 Log: MFp4: Enqueue thread in LIFO, this can cause starvation, but it gives better performance. Use _thr_queuefifo to control the frequency of FIFO vs LIFO, you can use envi

svn commit: r234937 - in stable/8: lib/libthr/thread sys/kern sys/sys

2012-05-02 Thread David Xu
Author: davidxu Date: Thu May 3 03:05:18 2012 New Revision: 234937 URL: http://svn.freebsd.org/changeset/base/234937 Log: Merge 233103, 233912 from head: 233103: Some software think a mutex can be destroyed after it owned it, for example, it uses a serialization point like following:

svn commit: r234373 - stable/8/lib/libthr/thread

2012-04-17 Thread David Xu
Author: davidxu Date: Tue Apr 17 09:18:06 2012 New Revision: 234373 URL: http://svn.freebsd.org/changeset/base/234373 Log: Merge 233103 from head: Some software think a mutex can be destroyed after it owned it, for example, it uses a serialization point like following: pthread_mut

svn commit: r234372 - stable/9/lib/libthr/thread

2012-04-17 Thread David Xu
Author: davidxu Date: Tue Apr 17 09:09:14 2012 New Revision: 234372 URL: http://svn.freebsd.org/changeset/base/234372 Log: Merge 233103, 233912 from head: 233103: Some software think a mutex can be destroyed after it owned it, for example, it uses a serialization point like following:

svn commit: r234371 - in stable/9/sys: kern sys

2012-04-17 Thread David Xu
Author: davidxu Date: Tue Apr 17 09:02:55 2012 New Revision: 234371 URL: http://svn.freebsd.org/changeset/base/234371 Log: MFC r233912: mtx operation UMTX_OP_MUTEX_WAKE has a side-effect that it accesses a mutex after a thread has unlocked it, it event writes data to the mutex memory to

svn commit: r233913 - in head: lib/libc/gen sys/kern

2012-04-04 Thread David Xu
Author: davidxu Date: Thu Apr 5 03:05:02 2012 New Revision: 233913 URL: http://svn.freebsd.org/changeset/base/233913 Log: In sem_post, the field _has_waiters is no longer used, because some application destroys semaphore after sem_wait returns. Just enter kernel to wake up sleeping threads,

svn commit: r233912 - in head: lib/libthr/thread sys/kern sys/sys

2012-04-04 Thread David Xu
Author: davidxu Date: Thu Apr 5 02:24:08 2012 New Revision: 233912 URL: http://svn.freebsd.org/changeset/base/233912 Log: umtx operation UMTX_OP_MUTEX_WAKE has a side-effect that it accesses a mutex after a thread has unlocked it, it event writes data to the mutex memory to clear contention

  1   2   3   4   >