Re: Changing v_op for vnode on the fly

2004-02-23 Thread Andrey Simonenko
On Mon, Feb 16, 2004 at 01:48:19PM -0500, Brian F. Feldman wrote:
  Having read documentation and analyzed sources, I think that MAC can't
  help.  MAC allows to synchronize access in read() and write() syscalls,
  but access to VOP_GETPAGES, which is called in vm_fault() for example,
  can't be synchronized using MAC framework.
 
 Well, there is the ability to prevent the mmap(2) in the first place using
 mac_check_vnode_mmap().  Is that close to sufficient for those purposes?

This is not enough, because I need to synchronize access in VOP_GETPAGES
on remote system to vnode (content of a file) on its home system.

 
  File systems umapfs, lomacfs, unionfs also don't help.  May be it is
  possible to do something with stackable VFS, but I haven't find
  a solution with stackable VFS yet.
 
 Try to look closer at them; I think it's possible to do a lot of what you 
 want because the initial LOMAC implementation for FreeBSD, before the MAC 
 framework existed, did just such a thing.

I looked at sources of lomacfs (initial implementation), nullfs and
unionfs in 4.x and 5.x, I have to say that not everything clear for me,
especially locking and unlocking in top layer and lower layer.  Now I
understand that changing v_op is not a right way to do what I want.

It seems that stackable VFS is what is needed for my purpose.  I created
stackable VFS and put it on top of the directory, in which files are
expected to be shared via network, if some process opens and then modifies
files in this directory, then each VOP_* will be caught by my top VFS
layer.

I didn't check, but it also seems that mmap'ed files also will
work, because of VOP_{CREATE|GET|DESTROY}VOBJECT calls usage.  I only
loose synchronization if some process opened files before top VFS layer
is installed and this process will use original vnode (which is lower
vnode for top VFS layer).

Since top VFS layer completely hides lower layer (there is no separate
mount point), then any process always will call VOP_* for top VFS layer,
as I understand lomacfs works in this way.

Thanks for your help again.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


HEADSUP: Commits Planned for 64-bit time_t on sparc64

2004-02-23 Thread Garance A Drosihn
  [this is being BCC'ed to -arch and -hackers just to make sure
   that everyone is aware of this before changes are committed,
   but I expect all of the discussion to happen on -current]
Sparc64 users (including me) have said that we'd like the sparc64
port to be running with a 64-bit time_t before we make a stable
branch for the 5.x-series.  I have been working on a procedure
that can be used to safely perform this very incompatible change.
I think I finally have that pretty much ready-to-go.
I will therefore make the bold claim that I plan to take the
files you can find at:
http://people.freebsd.org/~gad/time-64/UPDATING.64BTT
http://people.freebsd.org/~gad/time-64/installworld_oldk 
http://people.freebsd.org/~gad/time-64/installworld_newk

and I plan to commit them to /usr/src, on Wed March 3rd.  This
does not actually change anything, but it tells adventurous
sparc64 users that we're officially on the way to making this
change, so they can try upgrades to 64-bTT (64-bit time_t).
These files are only going to be in the base system long enough to
help sparc64 users through the transition.  I am very interested
in any show-stopper problems in what I have written.  My hope is
that these files will disappear shortly after 5.3-release, though,
so I don't want to spend much time polishing the scripts up when it
comes to style issues.  I'm still interested in hearing about them,
but I may not be in a rush to do anything about style issues.
Assuming that no one runs into a show-stopper problem, I plan to
commit the change to /usr/src/sys/sparc64/include/_types.h that
switches to 64-bTT for sparc. /usr/src/UPDATING will also need
to have an entry added, but that entry will just point to the
/usr/src/UPDATING.64bTT file.  I plan to commit this (or have
Warner commit the change to UPDATING?) on Wednesday March 10th.
All of these changes will cause zero changes for people who are
running on other hardware platforms.  Only sparc64 users have to lay
awake in terror of what this change might do to them.  I should note
that it *has* been working fine for me...  :-)   Also, about a dozen
other sparc64 users have used these files to make a successful
transition, with very few problems reported.
As for me, I expect that my real-work job is going to get much busier
by March 15th.  If this 64-bTT change is not committed at that point,
then some other developer will have to lead the charge for making
the change.  And, personally, I think we are already awfully close to
the time for 5.3-release, and we can not afford to get much closer to
it before making this change.  So if we can not make this change by
March 15th (at the latest), then I think we will have to put it off
until 6.0.  In fact, if I had a fix for the dhclient issue I would
prefer to move both of the planned commits up by a week.
I know this could be improved upon if I had more time to work on it,
but this is basically the best I could do with the time I had.  If
my main job had something to do with FreeBSD, then I would have some
way to justify spending more time working on issues like this...
--
Garance Alistair Drosehn=   [EMAIL PROTECTED]
Senior Systems Programmer   or  [EMAIL PROTECTED]
Rensselaer Polytechnic Instituteor  [EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 5.2.1-RC hangs occasionally when sound files are played using the pcm driver

2004-02-23 Thread Mathew Kanner
On Feb 23, Brian O'Shea wrote:
 --- Mathew Kanner [EMAIL PROTECTED] wrote:
  
  Hello Brian,
  Don Lewis commited changes to the 5.2- tree on 2/14.  Could
  you update and try again, also please do run with witness and
  invariants, and if possible try to get a crashdump so we can see
  what's happening.
 
 Sure.  I'll try to reproduce it with witness and invariants first, just
 to avoid changing too many conditions at the same time.  Failing that,
 I'll update to the latest 5.2 tree and see if the problem goes away.

I think it would be better to go to 5.2.1 and start testing
from there.  I believe that one of the things that Don improved was a
condition where sound could randomnly stomp other areas of the kernel.
--Mat
-- 
It's impossible to awaken a man who is pretending to be
asleep.
- Navajo saying

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 5.2.1-RC hangs occasionally when sound files are played using the pcm driver

2004-02-23 Thread Don Lewis
On 23 Feb, Mathew Kanner wrote:
 On Feb 23, Brian O'Shea wrote:
 --- Mathew Kanner [EMAIL PROTECTED] wrote:
  
 Hello Brian,
 Don Lewis commited changes to the 5.2- tree on 2/14.  Could
  you update and try again, also please do run with witness and
  invariants, and if possible try to get a crashdump so we can see
  what's happening.
 
 Sure.  I'll try to reproduce it with witness and invariants first, just
 to avoid changing too many conditions at the same time.  Failing that,
 I'll update to the latest 5.2 tree and see if the problem goes away.
 
   I think it would be better to go to 5.2.1 and start testing
 from there.  I believe that one of the things that Don improved was a
 condition where sound could randomnly stomp other areas of the kernel.

The memory corruption problem only happens if vchans are enabled and
typically causes wierd system panics instead of hangs.  Also, the commit
that I just did on the RELENG_5_2 branch only changes a KASSERT() to a
panic() so that the cause of the crash is obvious, since INVARIANTS is
disabled by default on this branch, which disables KASSERT().

The cause of deadlocks is more likely to be caught by WITNESS.  In this
case it might be the result of a malloc() call while a mutex is held.
Even the version of the sound code in the most recent -CURRENT has some
problems in this area.  I've got a patch out for testing that will this
problem to some extent, but it might not be enough.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Local APIC on FreeBSD/i386

2004-02-23 Thread Ralph S.
Hi,

I've been using FreeBSD for some time but I've never found a way to enable
the local APIC on my system (UP, Intel P3/450 (Katmai)).
What I'd like to know is whether there is a reason for the APIC not to be
used on UP systems (like Linux does, for example) or if not, what I would need
to do to change that.

Sincerely,

Ralph Schülke
--

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Local APIC on FreeBSD/i386

2004-02-23 Thread John Baldwin
On Monday 23 February 2004 09:40 am, Ralph S. wrote:
 Hi,

 I've been using FreeBSD for some time but I've never found a way to enable
 the local APIC on my system (UP, Intel P3/450 (Katmai)).
 What I'd like to know is whether there is a reason for the APIC not to be
 used on UP systems (like Linux does, for example) or if not, what I would
 need to do to change that.

As of 5.2, the 5.x branch will use the local APIC on UP systems.

-- 
John Baldwin [EMAIL PROTECTED]http://www.FreeBSD.org/~jhb/
Power Users Use the Power to Serve  =  http://www.FreeBSD.org
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 5.2.1-RC hangs occasionally when sound files are played using the pcm driver

2004-02-23 Thread Brian O'Shea
--- Don Lewis [EMAIL PROTECTED] wrote:
 
 The cause of deadlocks is more likely to be caught by WITNESS.  In this

With WITNESS the hang still occurrs, and still no panic.  It's hard to
tell since the problem tends to happen at random times, but it seems like
it happens more quickly with the kernel that has WITNESS and INVARIANTS
enabled.

 case it might be the result of a malloc() call while a mutex is held.
 Even the version of the sound code in the most recent -CURRENT has some
 problems in this area.  I've got a patch out for testing that will this
 problem to some extent, but it might not be enough.
 

I'd be willing to test your patch, if that would help.  Where can I
find it?

Thanks,
-brian


__
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cvs commit: src/sbin/nologin Makefile nologin.c

2004-02-23 Thread Tim Kientzle
[Discussion moved to -hackers...]

David Schultz wrote:
On Sun, Feb 22, 2004, Tim Kientzle wrote:

David Schultz wrote:

One unfortunate side-effect [of dynamic /bin is that] custom
versions of nologin that people have written as shell scripts are
now insecure.
Is there any reason why login -p should be permitted
if the user's shell is not listed in /etc/shells ?
chpass already enforces a clear distinction between
standard and non-standard shells.  It seems reasonable
for login(1) to also be aware of that distinction.
Good point.  I don't know of any reason for the present behavior.
I suppose the same reasoning would also apply to su and sshd  ...
And possibly telnetd?

Looking at telnetd, it uses the -p option to login
to preserve TERM.  But our login always preserves
TERM, regardless, so I think this could be removed.
I'm not entirely sure, though.  There are many layers
of #if/#else/#endif in that code, so I might be mis-reading things
here.  Our telnetd is also vendor code, so it would
be advisable to limit changes to the code directly.
It looks like it might suffice to add
   CFLAGS += -DNO_LOGIN_P

to src/libexec/telnetd/Makefile.

Thoughts?

Tim

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


ed0 problems

2004-02-23 Thread tee_aiche
hi,

FreeBSD beginner here.
planning to connect my FreeBSD box and my RedHat 9 box
at home, so that telnet into the FreeBSd box cause I
have just one monitor.

anyway,
I tried this:
/sbin/ifconfig ed0 192.168.0.2 netmask 255.255.255.0 

error returned was ed0 : no such interface.

There is also no 'ed0' under /dev. How do I setup
networking between two nodes?

Please help.

Thanks in advance,
Toufeeq

=
70uf33q 
ring me @ 98410-96690
mail me @ [EMAIL PROTECTED]
currently running on Shrike with GNOME 2.4 (SVG rokx)

__
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Creating a ``Magic Button''

2004-02-23 Thread Artem Ignatiev
Hello, hackers

Friend of mine, who's using linux, showed me once this kind of things:
``When I'm too bored to do shutdown, I use Alt-SysRq button.
Sync-Sync-Sync, remount all fs to r/o, halt'' - or something like that.

I thought that this will be useful feature - when system is almost dead,
but syscons's still alive (and you have no debugger in kernel) try to
minimize loss of data trying to sync your disks, and doing halt.

Adding ``SYNC'' button to syscons  kbdcontrol went fine, but then I
wished to make an accented keys, with all these neat things. I've found
that kbdcontrol don't allows me to use dead keys for entering other,
than just plain ascii symbols. So I wished to change kbdcontrol a little
bit more, to allow entering keys like ``pdwn'' from accents. So - the
last thing to do is to change definition of accentmap_t like this:

--- /sys/sys/kbio.h Mon Feb 23 22:24:24 2004
+++ kbio.h  Mon Feb 23 23:07:01 2004
@@ -179,13 +179,13 @@
 #define F(x)   ((x)+F_FN-1)
 #defineS(x)((x)+F_SCR-1)
 #define ACC(x) ((x)+F_ACC)
 
 struct acc_t {
u_char  accchar;
-   u_char  map[NUM_ACCENTCHARS][2];
+   u_short map[NUM_ACCENTCHARS][2];
 };
 
 struct accentmap {
u_short n_accs;
struct acc_tacc[NUM_DEADKEYS];
 };

but immediately after applying this patch, PIO_DEADKEYMAP suddenly
disappeared (kbdcontrol gets ENOTTY Inappopriate ioctl for device when
trying to set accentmap). 
I can't find out, what and where depends on acc_t. What am i missing?

Below is the patch of ``what i've done already'', it still lacks some
bits, like accurate dump of accents definitions.

--- ./sys/dev/kbd/kbd.c.origSun Jan 25 03:48:55 2004
+++ ./sys/dev/kbd/kbd.c Mon Feb 23 16:29:13 2004
@@ -1280,7 +1280,7 @@
/* NON-LOCKING KEYS */
case SPSC: case RBT:  case SUSP: case STBY:
case DBG:  case NEXT: case PREV: case PNC:
-   case HALT: case PDWN:
+   case HALT: case PDWN: case SYNC:
*accents = 0;
break;
case BTAB:
--- ./sys/dev/syscons/syscons.c.origSun Jan 25 04:02:07 2004
+++ ./sys/dev/syscons/syscons.c Mon Feb 23 16:57:39 2004
@@ -50,6 +50,7 @@
 #include sys/reboot.h
 #include sys/signalvar.h
 #include sys/sysctl.h
+#include sys/sysproto.h
 #include sys/tty.h
 #include sys/power.h
 
@@ -3355,6 +3356,10 @@
case PNC:
if (enable_panic_key)
panic(Forced by the panic key);
+   break;
+   case SYNC: 
+   printf(Syncing disks\n);
+   sync(thread0, NULL);
break;
 
case NEXT:
--- ./sys/sys/kbio.h.orig   Sun Jan 25 03:55:12 2004
+++ ./sys/sys/kbio.hMon Feb 23 22:24:24 2004
@@ -174,6 +174,7 @@
 #define HALT   0xa1/* halt machine */
 #define PDWN   0xa2/* halt machine and power down */
 #define PASTE  0xa3/* paste from cut-paste buffer */
+#define SYNC   0xa4/* force sync filesystems */
 
 #define F(x)   ((x)+F_FN-1)
 #defineS(x)((x)+F_SCR-1)
--- ./usr.sbin/kbdcontrol/lex.l.origSun Jan 25 04:15:46 2004
+++ ./usr.sbin/kbdcontrol/lex.l Sun Jan 25 04:16:01 2004
@@ -72,6 +72,7 @@
 halt   { return THALT; }
 pdwn   { return TPDWN; }
 paste  { return TPASTE; }
+sync   { return TSYNC; }
 
 NUL|nul{ number = 0; return TNUM; }
 SOH|soh{ number = 1; return TNUM; }
--- ./usr.sbin/kbdcontrol/lex.h.origSun Jan 25 04:16:23 2004
+++ ./usr.sbin/kbdcontrol/lex.h Sun Jan 25 04:16:48 2004
@@ -64,6 +64,7 @@
 #define THALT  289
 #define TPDWN  290
 #define TPASTE 291
+#define TSYNC  292
 
 extern int number;
 extern char letter;
--- ./usr.sbin/kbdcontrol/kbdcontrol.c.orig Sun Jan 25 04:17:01 2004
+++ ./usr.sbin/kbdcontrol/kbdcontrol.c  Mon Feb 23 22:12:07 2004
@@ -238,6 +238,8 @@
return PDWN | 0x100;
case TPASTE:
return PASTE | 0x100;
+   case TSYNC:
+   return SYNC | 0x100;
case TACC:
if (ACC(number)  L_ACC)
return -1;
@@ -360,6 +362,39 @@
return -1;
}
switch ((token = yylex())) {
+   case TNEXT:
+   c2 = NEXT | SPCLKEY;
+   break;
+   case TPREV:
+   c2 = PREV | SPCLKEY;
+   break;
+   case TRBT:
+   c2 = RBT | SPCLKEY;
+   break;
+   case TDBG:
+   c2 = DBG | SPCLKEY;
+   break;
+   case TSUSP:
+   c2 = SUSP | SPCLKEY;
+

RE: [Freebsd-hackers] ed0 problems

2004-02-23 Thread Remko Lodder
Checkout dmesg | more
See if your network card is listed there, with it's interface name and
correct your commands :)


Cheers

--

Kind regards,

Remko Lodder
Elvandar.org/DSINet.org
www.mostly-harmless.nl Dutch community for helping newcomers on the
hackerscene

mrtg.grunn.org Dutch mirror of MRTG

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] tee_aiche
Verzonden: maandag 23 februari 2004 20:46
Aan: [EMAIL PROTECTED]
Onderwerp: [Freebsd-hackers] ed0 problems


hi,

FreeBSD beginner here.
planning to connect my FreeBSD box and my RedHat 9 box
at home, so that telnet into the FreeBSd box cause I
have just one monitor.

anyway,
I tried this:
/sbin/ifconfig ed0 192.168.0.2 netmask 255.255.255.0

error returned was ed0 : no such interface.

There is also no 'ed0' under /dev. How do I setup
networking between two nodes?

Please help.

Thanks in advance,
Toufeeq

=
70uf33q
ring me @ 98410-96690
mail me @ [EMAIL PROTECTED]
currently running on Shrike with GNOME 2.4 (SVG rokx)

__
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]
___
Freebsd-hackers mailing list
[EMAIL PROTECTED]
http://lists.elvandar.org/mailman/listinfo/freebsd-hackers

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: ed0 problems

2004-02-23 Thread tee_aiche
hi,

I'm using the 3Com EtherLink XL Boomerang Ethernet
Card.

I use the 3c59x module in Linux.

can I use the same module with kldload ?

and during the boot process it does mention the name
of my Ethernet Card along with the MAC address.

thnx,
Toufeeq
--- Jose Hidalgo Herrera [EMAIL PROTECTED] wrote:
 You need to load the module, or cd /dev; sh MAKEDEV
 ed0
 Are you sure that the interface is ok ?
 
 On Mon, 2004-02-23 at 13:46, tee_aiche wrote:
  hi,
  
  FreeBSD beginner here.
  planning to connect my FreeBSD box and my RedHat 9
 box
  at home, so that telnet into the FreeBSd box cause
 I
  have just one monitor.
  
  anyway,
  I tried this:
  /sbin/ifconfig ed0 192.168.0.2 netmask
 255.255.255.0 
  
  error returned was ed0 : no such interface.
  
  There is also no 'ed0' under /dev. How do I setup
  networking between two nodes?
  
  Please help.
  
  Thanks in advance,
  Toufeeq
  
  =
  70uf33q 
  ring me @ 98410-96690
  mail me @ [EMAIL PROTECTED]
  currently running on Shrike with GNOME 2.4 (SVG
 rokx)
  
  __
  Do you Yahoo!?
  Yahoo! Mail SpamGuard - Read only the mail you
 want.
  http://antispam.yahoo.com/tools
  ___
  [EMAIL PROTECTED] mailing list
 

http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
  To unsubscribe, send any mail to
 [EMAIL PROTECTED]
 -- 
 Ing. Jose Hidalgo Herrera
 PGP: 15524480 /  6EB8 4AF6 2A7D 
 01CD 13B5 82F3 31BE BBE1 1552 4480
 IT Developer
 T: +506.256.5021 x110
 F: +506.256.4334
 Toll Free: 1-888.451.0125 x105
 E:[EMAIL PROTECTED]
 Hostarica - Managed Collocation
 www.hostarica.com
 

 ATTACHMENT part 2 application/pgp-signature
name=signature.asc



=
70uf33q 
ring me @ 98410-96690
mail me @ [EMAIL PROTECTED]
currently running on Shrike with GNOME 2.4 (SVG rokx)

__
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: ed0 problems

2004-02-23 Thread Jose Hidalgo Herrera
man 4 xl
try:
ifconfig xl0 ip netmask netmask

dmesg | grep xl.:

echo /modules/if_x*


On Mon, 2004-02-23 at 14:40, tee_aiche wrote:
 hi,
 
 I'm using the 3Com EtherLink XL Boomerang Ethernet
 Card.
 
 I use the 3c59x module in Linux.
 
 can I use the same module with kldload ?
 
 and during the boot process it does mention the name
 of my Ethernet Card along with the MAC address.
 
 thnx,
 Toufeeq
 --- Jose Hidalgo Herrera [EMAIL PROTECTED] wrote:
  You need to load the module, or cd /dev; sh MAKEDEV
  ed0
  Are you sure that the interface is ok ?
  
  On Mon, 2004-02-23 at 13:46, tee_aiche wrote:
   hi,
   
   FreeBSD beginner here.
   planning to connect my FreeBSD box and my RedHat 9
  box
   at home, so that telnet into the FreeBSd box cause
  I
   have just one monitor.
   
   anyway,
   I tried this:
   /sbin/ifconfig ed0 192.168.0.2 netmask
  255.255.255.0 
   
   error returned was ed0 : no such interface.
   
   There is also no 'ed0' under /dev. How do I setup
   networking between two nodes?
   
   Please help.
   
   Thanks in advance,
   Toufeeq
   
   =
   70uf33q 
   ring me @ 98410-96690
   mail me @ [EMAIL PROTECTED]
   currently running on Shrike with GNOME 2.4 (SVG
  rokx)
   
   __
   Do you Yahoo!?
   Yahoo! Mail SpamGuard - Read only the mail you
  want.
   http://antispam.yahoo.com/tools
   ___
   [EMAIL PROTECTED] mailing list
  
 
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
   To unsubscribe, send any mail to
  [EMAIL PROTECTED]
  -- 
  Ing. Jose Hidalgo Herrera
  PGP: 15524480 /  6EB8 4AF6 2A7D 
  01CD 13B5 82F3 31BE BBE1 1552 4480
  IT Developer
  T: +506.256.5021 x110
  F: +506.256.4334
  Toll Free: 1-888.451.0125 x105
  E:[EMAIL PROTECTED]
  Hostarica - Managed Collocation
  www.hostarica.com
  
 
  ATTACHMENT part 2 application/pgp-signature
 name=signature.asc
 
 
 
 =
 70uf33q 
 ring me @ 98410-96690
 mail me @ [EMAIL PROTECTED]
 currently running on Shrike with GNOME 2.4 (SVG rokx)
 
 __
 Do you Yahoo!?
 Yahoo! Mail SpamGuard - Read only the mail you want.
 http://antispam.yahoo.com/tools
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to [EMAIL PROTECTED]
-- 
Ing. Jose Hidalgo Herrera
PGP: 15524480 /  6EB8 4AF6 2A7D 
01CD 13B5 82F3 31BE BBE1 1552 4480
IT Developer
T: +506.256.5021 x110
F: +506.256.4334
Toll Free: 1-888.451.0125 x105
E:[EMAIL PROTECTED]
Hostarica - Managed Collocation
www.hostarica.com


signature.asc
Description: This is a digitally signed message part


Re: Local APIC on FreeBSD/i386

2004-02-23 Thread Bruce M Simpson
On Mon, Feb 23, 2004 at 10:20:57AM -0500, John Baldwin wrote:
 As of 5.2, the 5.x branch will use the local APIC on UP systems.

Yay! Hopefully my pseudo-NMI-on-ThinkPad-button hack to the ACPI DSDT will
work..

BMS
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 5.2.1-RC hangs occasionally when sound files are played using the pcm driver

2004-02-23 Thread Brian O'Shea
--- Brian O'Shea [EMAIL PROTECTED] wrote:
 --- Mathew Kanner [EMAIL PROTECTED] wrote:
  
  Hello Brian,
  Don Lewis commited changes to the 5.2- tree on 2/14.  Could
  you update and try again, also please do run with witness and
  invariants, and if possible try to get a crashdump so we can see
  what's happening.
 
 Sure.  I'll try to reproduce it with witness and invariants first, just
 to avoid changing too many conditions at the same time.  Failing that,
 I'll update to the latest 5.2 tree and see if the problem goes away.

makeoptions DEBUG=-g#Build kernel with gdb(1) debug symbols
options INVARIANTS  #Enable calls of extra sanity checking
options INVARIANT_SUPPORT   #Extra sanity checks of internal
structures, required by INVARIANTS
options WITNESS #Enable checks to detect deadlocks and
cycles
#optionsWITNESS_SKIPSPIN#Don't run witness on spinlocks for
speed

Ok, the problem seems to happen much more reliably now, but still no
panic (so no crash dump).  However, I did notice that for some reason
I had built an SMP kernel.  All kernels that I have seen exhibit this pcm
driver hang were apparently SMP kernels...I guess that's the default
in GENERIC, which I copied and adapted for my kernel config.  As my system
only has one CPU, I will build a UP kernel and see if that has any
effect.

Thanks,
-brian


__
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 5.2.1-RC hangs occasionally when sound files are played using the pcm driver

2004-02-23 Thread Don Lewis
On 23 Feb, Brian O'Shea wrote:
 --- Don Lewis [EMAIL PROTECTED] wrote:
 
 The cause of deadlocks is more likely to be caught by WITNESS.  In this
 
 With WITNESS the hang still occurrs, and still no panic.  It's hard to
 tell since the problem tends to happen at random times, but it seems like
 it happens more quickly with the kernel that has WITNESS and INVARIANTS
 enabled.

Can you see any kernel diagnostic messages, or are you running X?  If
you are running X, can you set up a serial console, or can you reproduce
the hang while switched to a text console?

Depending on the cause of the problem, you might need to build a kernel
with DDB support and break into DDB from the console while the machine
is hung to figure out the cause.

 case it might be the result of a malloc() call while a mutex is held.
 Even the version of the sound code in the most recent -CURRENT has some
 problems in this area.  I've got a patch out for testing that will this
 problem to some extent, but it might not be enough.
 
 
 I'd be willing to test your patch, if that would help.  Where can I
 find it?

The patch below should be applied to a recent version of -CURRENT.

Index: sys/dev/sound/pcm/dsp.c
===
RCS file: /home/ncvs/src/sys/dev/sound/pcm/dsp.c,v
retrieving revision 1.73
diff -u -r1.73 dsp.c
--- sys/dev/sound/pcm/dsp.c 21 Feb 2004 21:10:47 -  1.73
+++ sys/dev/sound/pcm/dsp.c 22 Feb 2004 23:11:43 -
@@ -444,7 +444,7 @@
 static int
 dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td)
 {
-   struct pcm_channel *wrch, *rdch;
+   struct pcm_channel *chn, *rdch, *wrch;
struct snddev_info *d;
intrmask_t s;
int kill;
@@ -477,22 +477,19 @@
if (kill  2)
rdch = NULL;

-   if (rdch != NULL)
-   CHN_LOCK(rdch);
-   if (wrch != NULL)
-   CHN_LOCK(wrch);
-
switch(cmd) {
 #ifdef OLDPCM_IOCTL
/*
 * we start with the new ioctl interface.
 */
case AIONWRITE: /* how many bytes can write ? */
+   CHN_LOCK(wrch);
 /*
if (wrch  wrch-bufhard.dl)
while (chn_wrfeed(wrch) == 0);
 */
*arg_i = wrch? sndbuf_getfree(wrch-bufsoft) : 0;
+   CHN_UNLOCK(wrch);
break;
 
case AIOSSIZE: /* set the current blocksize */
@@ -502,12 +499,16 @@
p-play_size = 0;
p-rec_size = 0;
if (wrch) {
+   CHN_LOCK(wrch);
chn_setblocksize(wrch, 2, p-play_size);
p-play_size = sndbuf_getblksz(wrch-bufsoft);
+   CHN_UNLOCK(wrch);
}
if (rdch) {
+   CHN_LOCK(rdch);
chn_setblocksize(rdch, 2, p-rec_size);
p-rec_size = sndbuf_getblksz(rdch-bufsoft);
+   CHN_UNLOCK(rdch);
}
}
break;
@@ -515,37 +516,51 @@
{
struct snd_size *p = (struct snd_size *)arg;
 
-   if (wrch)
+   if (wrch) {
+   CHN_LOCK(wrch);
p-play_size = sndbuf_getblksz(wrch-bufsoft);
-   if (rdch)
+   CHN_UNLOCK(wrch);
+   }
+   if (rdch) {
+   CHN_LOCK(rdch);
p-rec_size = sndbuf_getblksz(rdch-bufsoft);
+   CHN_UNLOCK(rdch);
+   }
}
break;
 
case AIOSFMT:
+   case AIOGFMT:
{
snd_chan_param *p = (snd_chan_param *)arg;
 
if (wrch) {
-   chn_setformat(wrch, p-play_format);
-   chn_setspeed(wrch, p-play_rate);
+   CHN_LOCK(wrch);
+   if (cmd == AIOSFMT) {
+   chn_setformat(wrch, p-play_format);
+   chn_setspeed(wrch, p-play_rate);
+   }
+   p-play_rate = wrch-speed;
+   p-play_format = wrch-format;
+   CHN_UNLOCK(wrch);
+   } else {
+   p-play_rate = 0;
+   p-play_format = 0;
}
if (rdch) {
-   chn_setformat(rdch, p-rec_format);
-   chn_setspeed(rdch, p-rec_rate);
+ 

Re: 5.2.1-RC hangs occasionally when sound files are played using the pcm driver

2004-02-23 Thread Don Lewis
On 23 Feb, Brian O'Shea wrote:
 --- Brian O'Shea [EMAIL PROTECTED] wrote:
 --- Mathew Kanner [EMAIL PROTECTED] wrote:
  
 Hello Brian,
 Don Lewis commited changes to the 5.2- tree on 2/14.  Could
  you update and try again, also please do run with witness and
  invariants, and if possible try to get a crashdump so we can see
  what's happening.
 
 Sure.  I'll try to reproduce it with witness and invariants first, just
 to avoid changing too many conditions at the same time.  Failing that,
 I'll update to the latest 5.2 tree and see if the problem goes away.
 
 makeoptions DEBUG=-g#Build kernel with gdb(1) debug symbols
 options INVARIANTS  #Enable calls of extra sanity checking
 options INVARIANT_SUPPORT   #Extra sanity checks of internal
 structures, required by INVARIANTS
 options WITNESS #Enable checks to detect deadlocks and
 cycles
 #optionsWITNESS_SKIPSPIN#Don't run witness on spinlocks for
 speed
 
 Ok, the problem seems to happen much more reliably now, but still no
 panic (so no crash dump).  However, I did notice that for some reason
 I had built an SMP kernel.  All kernels that I have seen exhibit this pcm
 driver hang were apparently SMP kernels...I guess that's the default
 in GENERIC, which I copied and adapted for my kernel config.  As my system
 only has one CPU, I will build a UP kernel and see if that has any
 effect.

Witness won't trigger a panic.  It just prints some information to the
console about the error.

SMP is now the default and runs fine on UP boxes.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clarification needed on Handbook: Tracking for Multiple Machines

2004-02-23 Thread Tony Frank
Hi,

On Mon, Feb 23, 2004 at 10:46:07AM -0600, D J Hawkey Jr wrote:
 On Feb 23, at 09:12 AM, M. Warner Losh wrote:
  
  In message: [EMAIL PROTECTED]
  D J Hawkey Jr [EMAIL PROTECTED] writes:
  : True or False: Setting CPUTYPE to the lowest target CPU (p2) in
  : a build machine's make.conf will cripple the performance of target
  : machines with higher CPUs (p3, p4, i586, i686, etc.).
  
  False.  It might have a minor impact on performance, but not a major
  one.  At least in my experience.  Minor here means  10% for something
  like the world stone.  Cripple to me implies  25%.
 
 OK, thanks. Just to satisfy my anal-retentive side, would that ~10%
 degradation be a higher level of performance on a PIII (or higher)
 with no CPUTYPE specified at all, given the same *FLAGS?

Perhaps the easiest option is to actually try it and see what the results
are?

  : If True, for optimized code across all machines, the code should
  : just be built on each machine, right?
  That would give slightly better performance.  However, it can be more
  pain than it is worth if the number of machine types is high.
 Consuming considerably more time and disk space, a shell script to
 alter make.conf and rename /usr/obj between the build for each machine
 is doable, though pro'lly not worth it. The install at each each box
 would just have to mount it's corresponding /usr/obj tree.

Just need to set __MAKE_CONF and MAKEOBJDIRPREFIX before running the build.

Regards,

Tony
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]