Syscall/Sysret state on i386 arch

2005-08-28 Thread alexander
The AMD64 arch is using the syscall/sysret opcodes instead of int80h to perform
a syscall (/usr/src/lib/libc/amd64/SYS.h). I just checked the output my of
dmesg and it says:

CPU: AMD Duron(tm) Processor (1311.69-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x671  Stepping = 1
  Features=0x383f9ff
  AMD Features=0xc0400800

I got a hold of the AMD document number 21086.pdf. It describes both opcodes
pretty well, but doesn't tell which CPUs support the new opcodes. But since the
first revision of that document is dated Sept 1997 quite a lot of i386 CPU's
should support the opcodes. The NASM manual only states [P6,AMD] as the
required CPU to perform those opcodes.

I found some patches for Linux that replace the int80h syscall calling
convention with syscall/sysret on i386 and the results look pretty convincing:

> (INT $0x80 based getpid(), got pid 497) latency:282 cycles
> (SYSENTER based getpid(), got pid 497) latency:138 cycles
> 
> on a 266 MHz PII this is 0.51 usecs for a getpid(). (was 1.06 usecs)

Quoted from: http://www.ussg.iu.edu/hypermail/linux/kernel/9806.1/0878.html

Does anybody know more about this? Is it even possible to replace the current
syscall implementation that easily or would that require elaborate changes to 
all the
syscalls (libc), etc. And which CPU's support these new opcodes? Doesn anybody 
know if
the Linux patches actually got comitted to the official kernel?

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


Re: [PATCH] caching daemon release and nsswitch patches

2005-08-28 Thread Doug Barton

Michael Bushkov wrote:
Hi! I'm working on nsswitch improvement (during the Google Summer of 
Code program. 


First off, let me say that this is very exciting stuff! I'm particularly 
excited about caching for the services stuff, as it will finally allow us to 
bring in a more complete version of the services file. I do have some 
comments for you, and I hope that you understand that they are in no way 
critical of your work, just suggestions for improvements, and ways that you 
can better fit into the FreeBSD code base.


I'm not sure what guidelines were given to you when you started the project, 
but in reviewing your work the first thing I noticed was that you are not 
following the guidelines in the style(9) man page. You should read that 
page, and spend an afternoon reformatting your code to fit what is described 
there. The most common error you've made is not following the 80 column 
rule, which hopefully should be easily fixed. While one could argue with the 
specific items in that page, and quite possibly be right, the idea of having 
a style guideline is more to have a common format that we can all work 
towards than to have a perfect format that we can all agree on. By 
reformatting your code to fit this guideline you will greatly increase the 
chances that it will be welcomed into the tree with open arms.


The other style area that you should look at is your man pages. If you look 
in /usr/share/examples/mdoc you will find the FreeBSD style guidelines for 
man pages. The line wrapping issue comes into play here as well. We 
generally don't go past column 60 in man pages, since that reduces CVS repo 
churn for corrections down the road. Also, any time you have a full stop 
(period) at the end of a sentence, you should start a new line. I think that 
you are also using some macros that I'm not familiar with, although I'm not 
an mdoc expert.


The other area that I'm interested in is how you plan to have cached 
interact with DNS lookups, /etc/hosts, named, etc. If there was a project 
plan posted somewhere on this already and I missed it, please accept my 
apologies, and send along a reference. If not, I'm very interested to hear 
what your plans are.


Regards,

Doug


--

This .signature sanitized for your protection

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


bge driver internal routing issues?

2005-08-28 Thread Steven Hartland

Having a really odd problem here where udp queries to
servers running on machines with bge cards dont respond
via ip address that are being bound on:

qop1# ifconfig
bge0: flags=8843 mtu 1500
   options=1a
   inet 217.41.254.99 netmask 0xff80 broadcast 217.41.254.127
   ether 00:e0:81:63:9c:0a
   media: Ethernet autoselect (100baseTX )
   status: active
bge1: flags=8802 mtu 1500
   options=1a
   ether 00:e0:81:63:9c:09
   media: Ethernet autoselect (none)
   status: no carrier
lo0: flags=8049 mtu 16384
   inet 127.0.0.1 netmask 0xff00

qop1# sockstat |grep 8478
mpukgame ucc-bin42425 66 udp4   *:8478*:*
mpukgame ucc-bin42424 66 udp4   *:8478*:*

qop1# qstat -uns 127.0.0.1:8478 -noportoffset
ADDRESS   PLAYERS  MAP   RESPONSE TIMENAME
127.0.0.1:8478 0/10 CTF-Cybrosis][ 42 / 0  CTFGame i25 :: CTF #1

qop1# qstat -uns 217.41.254.99:8478 -noportoffset
ADDRESS   PLAYERS  MAP   RESPONSE TIMENAME
217.41.254.99:8478 no response

FreeBSD qop1.event.multiplay.co.uk 5.4-RELEASE-p2 FreeBSD 5.4-RELEASE-p2 #5: Tue Jun 21 13:28:12 UTC 2005 
[EMAIL PROTECTED]:/.usr/i386/src/sys/i386/compile/MPUK_SINGLE_200HZ  i386


Running the exact same test on a machine with an em driver has no
problems.

No idea where to start with this one any pointers appreciated.

   Steve





This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 


In the event of misdirection, illegible or incomplete transmission please 
telephone (023) 8024 3137
or return the E.mail to [EMAIL PROTECTED]

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


How to disable copy and paste in a virtual terminal ?

2005-08-28 Thread Mike Adewole
Can someone please tell me how to disable copy and paste in a virtual
terminal ?

I've tried recompiling the kernel with SC_NO_CUTPASTE but then the mouse
pointer disappears completely from the console. It doesn't show with
"vidcontrol -m on" nor from sysinstall/configure/mouse but it does show up
in X.

Thanks for any and all pointers.
Mike

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