possibly missed wakeup in swap_pager_getpages()

2007-03-09 Thread Divacky Roman
hi when looking at PR103455 I found this and I have a question.. code: swp_pager_strategy(bp); /* * wait for the page we want to complete. VPO_SWAPINPROG is always * cleared on completion. If an I/O error occurs, SWAPBLK_NONE * is set in the meta-data.

Re: Hung kernel from sysv semaphore semu_list corruption

2007-03-08 Thread Divacky Roman
On Wed, Mar 07, 2007 at 06:07:31PM -0500, Ed Maste wrote: > Nightly tests on our 6.1-based installation using pgsql have resulted in > a number of kernel hangs, due to a corrupt semu_list (the list ended up > with a loop). > > It seems there are a few holes in the locking in the semaphore code. T

investigation of Giant usage in kernel

2007-03-04 Thread Divacky Roman
hi I looked at where Giant is held in the kernel and I found these interesting things: 1) in fs/fifofs/fifo_vnops.c we lock Giant when calling sorecieve()/sosend() this is a bandaid for fixing a race that doesnt have to exist anymore. ie. it needs some testing and can be remvoed 2) in geom/geom

inconsistency in using vn_fullpath1()

2007-03-04 Thread Divacky Roman
hi I noticed that kern___getcwd() calls vn_fullpath1() with Giant held like this: mtx_lock(&Giant); FILEDESC_LOCK(fdp); error = vn_fullpath1(td, fdp->fd_cdir, fdp->fd_rdir, tmpbuf, &bp, buflen); FILEDESC_UNLOCK(fdp); mtx_unlock(&Giant); on the

Re: Progress on scaling of FreeBSD on 8 CPU systems

2007-02-26 Thread Divacky Roman
On Sat, Feb 24, 2007 at 04:31:11PM -0500, Kris Kennaway wrote: > Now that the goals of the SMPng project are complete, for the past > year or more several of us have been working hard on profiling FreeBSD > in various multiprocessor workloads, and looking for performance > bottlenecks to be optimiz

ISOPEN flag to namei

2007-01-13 Thread Divacky Roman
hi what is the ISOPEN flag to namei good for? the description there says "caller is opening; return a real vnode." but the flag doesnt seem to be used anywhere for anything thnx roman ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.o

Re: Partially Unbreak Adobe Reader 7.0.8 for the New Linux Emulator

2007-01-03 Thread Divacky Roman
On Wed, Jan 03, 2007 at 07:47:28AM +0800, Intron is my alias on the Internet wrote: > My patch for /sys/compat/linux/linux_file.c (7.0-CURRENT) can > partially unbreak Adobe Reader 7.0.8 for Linux when the sysctl > compat.linux.osrelease is set to "2.6.16". You may download the patch > at: >

Re: Newbie request - compiling with Xlib.h

2006-12-18 Thread Divacky Roman
On Sun, Dec 17, 2006 at 01:43:57AM -0200, Henry Lenzi wrote: > Hi * > > I'm trying to follow the following tutorial for Xlib prpogramming: > > http://users.actcom.co.il/~choo/lupg/tutorials/xlib-programming/xlib-programming.html#preface > > However, I can't seem to compile the simple-drawing.c e

Re: Yet another magic symlinks implementation

2006-11-04 Thread Divacky Roman
On Sat, Nov 04, 2006 at 11:56:29AM +0300, Andrey V. Elsukov wrote: > Hi, All! > > I've ported NetBSD magic symlinks implementation to FreeBSD. > The description of magiclinks can been found here: > http://www.daemon-systems.org/man/symlink.7.html > > Patch here: > http://butcher.heavennet.ru/patc

Re: Threading system calls (int 80h)

2006-10-17 Thread Divacky Roman
On Mon, Oct 16, 2006 at 02:08:59PM +0200, Marco van de Voort wrote: > > > > On Sunday 15 October 2006 01:32, David Xu wrote: > > > You are going to be unable to use libc if you create raw thread in your > > > program, libc uses pthread APIs, if you create a raw thread, your > > > program will cras

filedesc copying in fork()

2006-10-01 Thread Divacky Roman
hi I am trying to implement CLONE_FS in linuxolator clone(). This flags is used when we want the newly created thread share root/cwd/umask. In FreeBSD we have a flags to fork1() RFFDG/RFCFDG. The first one tells fork1() to copy the filedesc from old proc to the new one. The later says we should c

RFMEM and mmap()

2006-08-23 Thread Divacky Roman
hi I wonder what happens when proc A, create proc B using fork1(td, RFMEM, 0, &p2); and either A or B mmap()s something. is the mmaped memory shared among the procs? what if it brk()s something? thnx roman -- www.liberalnistrana.cz ___

Re: SoC: help with LISTs and killing procs

2006-08-11 Thread Divacky Roman
> You could make em_find() take an argument to specify if it should acquire > a WLOCK instead of an RLOCK. Really, unless you have measured a lot of > contention on this lock, you should just make it a mtx, and only go back and > make it a rwlock if it really needs it. Also, you currently can't

Re: SoC: help with LISTs and killing procs

2006-08-10 Thread Divacky Roman
On Thu, Aug 10, 2006 at 10:43:05AM -0500, Brooks Davis wrote: > On Thu, Aug 10, 2006 at 05:35:43PM +0200, Divacky Roman wrote: > > On Thu, Aug 10, 2006 at 10:23:59AM -0500, Brooks Davis wrote: > > > On Thu, Aug 10, 2006 at 05:16:17PM +0200, Divacky Roman wrote: > > >

Re: SoC: help with LISTs and killing procs

2006-08-10 Thread Divacky Roman
On Thu, Aug 10, 2006 at 10:23:59AM -0500, Brooks Davis wrote: > On Thu, Aug 10, 2006 at 05:16:17PM +0200, Divacky Roman wrote: > > hi > > > > I am doing this: > > > > (pseudocode) > > LIST_FOREACH_SAFE(em, &td_em->shared->threads,

SoC: help with LISTs and killing procs

2006-08-10 Thread Divacky Roman
hi I am doing this: (pseudocode) LIST_FOREACH_SAFE(em, &td_em->shared->threads, threads, tmp_em) { kill(em, SIGKILL); } kill(SIGKILL) calls exit() which calls my exit_hook() my exit_hook() does LIST_REMOVE(em, threads). the problem is that this is not synchronous so I am getting a pan

Re: VM question related to faults

2006-07-30 Thread Divacky Roman
On Sun, Jul 30, 2006 at 12:57:32PM +0200, Divacky Roman wrote: > hi, > > while working on SoC linuxolator project I am in a need of this: > > I need to do some operation on memory like mem1 = mem1 + mem2 etc. > where the mem1/mem2 access can trigger fault. (memory not mapped

VM question related to faults

2006-07-30 Thread Divacky Roman
hi, while working on SoC linuxolator project I am in a need of this: I need to do some operation on memory like mem1 = mem1 + mem2 etc. where the mem1/mem2 access can trigger fault. (memory not mapped or something) currently I solve this by using pcb_onfault. this must be done in asm (kib@ told

Re: i386 registers during a syscall

2006-07-24 Thread Divacky Roman
On Sun, Jul 23, 2006 at 11:18:56PM +0200, Attilio Rao wrote: > 2006/7/23, Divacky Roman <[EMAIL PROTECTED]>: > >hi, > > > >I need to get content of %esi register as it was during a syscall. Should > >I get > >this info from td->td_pcb->pcb_esi

i386 registers during a syscall

2006-07-23 Thread Divacky Roman
hi, I need to get content of %esi register as it was during a syscall. Should I get this info from td->td_pcb->pcb_esi or td->td_frame->tf_esi? Is it so that trapframe is "content of registers when entering a kernel" and pcb is "when leaving a kernel" ? thnx for info roman ---

Re: WINE vs. FreeBSD

2006-07-23 Thread Divacky Roman
On Sat, Jul 22, 2006 at 07:15:35PM -0400, Daniel Eischen wrote: > On Sat, 22 Jul 2006, Michael Nottebrock wrote: > > >On Saturday, 22. July 2006 21:20, Kip Macy wrote: > >>Thanks for your input. > >> > >>The relative merits of the different threading libraries is currently > >>under discussion. Co

linux gdb doesnt work at all, fbsd one with problems

2006-07-15 Thread Divacky Roman
hi linux gdb doesnt work at all with internal error (some assert condition doesnt hold), this is manifested by simple: gdb /bin/ls run (sorry cant paste the output now because currently linuxolator panics for me on every load :)) fbsd gdb is not able to attach to a running proce

Re: [SoC]: question about execve()

2006-07-13 Thread Divacky Roman
On Thu, Jul 13, 2006 at 06:12:40PM +0200, Divacky Roman wrote: > hi, > > durin my work on SoC I happened to be in a need of "catching" the transition > of > execve() from fbsd binary to linux binary and back. > > Kostik Belousov suggested using the process_e

[SoC]: question about execve()

2006-07-13 Thread Divacky Roman
hi, durin my work on SoC I happened to be in a need of "catching" the transition of execve() from fbsd binary to linux binary and back. Kostik Belousov suggested using the process_exit handler event but it doesnt contain information necessary to distinguish such a switch. He proposes extending

gdb able to debug both fbsd and linux binaries

2006-07-09 Thread Divacky Roman
hi, is it able to somehow make gdb be able to debug fbsd and linux binaries at the same time? I mean.. alter somehow the way its built in buildworld or something thnx roman -- www.liberalnistrana.cz ___ freebsd-hackers@freebsd.org

Re: Alternative compiler toolchain ?

2006-07-01 Thread Divacky Roman
On Fri, Jun 30, 2006 at 10:21:39PM -0500, Dan Nelson wrote: > In the last episode (Jul 01), Jean-Marc Lienher said: > > After a (too?) quick look at the FreeBSD source code, I've seen that > > the GNU compiler toolchain was used to compile the kernel and other > > part of the OS. > > > > I would l

Re: TLS - implementing linux one in fbsd

2006-06-21 Thread Divacky Roman
> > Linux uses strict 1:1 threading so every thread is in fact process, so > > thread creation is done using plain clone()/fork(). FreeBSD uses M:N > > (including 1:1) threading. Threads are created via pthread_create() call to > > threading library. In kernel there's thr_new() syscall or thread_cr

TLS - implementing linux one in fbsd

2006-06-20 Thread Divacky Roman
Hi I am student working on SoC project - extending linuxolator, now I am working on implementing linux TLS in FreeBSD. Here is what I think/know and I like you to comment on this, thnx. Roman - Linux and FreeBSD TLS implementation - comparison Bot

Re: TLS (thread local storage) - where/how

2006-06-18 Thread Divacky Roman
On Sun, Jun 18, 2006 at 11:58:50AM +0300, Alex Lyashkov wrote: > ? ???, 18.06.2006, ? 10:55, Divacky Roman ?: > > hi > > > > I am working on SoC project extending the linuxolator and it now seems that > > I > > have to implement TLS. So I'd

TLS (thread local storage) - where/how

2006-06-18 Thread Divacky Roman
hi I am working on SoC project extending the linuxolator and it now seems that I have to implement TLS. So I'd love to collect as many information as possible. pls can you tell me about any documents, articles etc. about the topic? or point me to a person "with a clue" ? thnx roman --

SoC: strange magic with objcopy and module builds

2006-06-06 Thread Divacky Roman
Hi, I am working on SoC linuxolator and I found strange thing I dont know how to cope with: I made a patch which enables module build of linuxolator on amd64 but it refuses to kldload because of missing symbol. I tracked the problem down to the fact that i386 module build works in a way that it b

automatic checking of source code

2006-04-05 Thread Divacky Roman
hi I just found http://mygcc.free.fr/ which is a project for automatic checking of source code for bugs (memory leaks, unreleased locks, null pointer dereferences). I recall there was some SoC project to achieve something similar but this is complete and ready to run... it might be of some intere

precompiled header

2006-03-26 Thread Divacky Roman
hi why fbsd dont use precompiled headers during buildword/buildkernel? I just did very naive test (which doesnt work for a lot of the headers) cd /sys; find . -name \*.h -exec gcc -x c-header {} \; time buildkernel and delete those compiled headers and time buildkernel again there is a speedup

Re: 6.1 libpthread: pthread_create and _pq_insert_tail: Already in priority queue

2006-03-22 Thread Divacky Roman
On Wed, Mar 22, 2006 at 11:24:36AM +0100, Volker Stolz wrote: > A rather largish application (the most recent version of GHC, see lang/ghc) > fails in its runtime system with: > > _pq_insert_tail: Already in priority queue two pointers: 1) I use ghc daily without this problem 2) I got this error

sched_newthread question

2006-03-04 Thread Divacky Roman
hi, sched_newthread(struct thread *td) { struct td_sched *ke; ke = (struct td_sched *) (td + 1); bzero(ke, sizeof(*ke)); td->td_sched = ke; ke->ke_thread = td; ke->ke_state= KES_THREAD; } whats the logic behind: ke = (struct td_sched *

Re: LDFLAGS setting

2006-02-21 Thread Divacky Roman
On Mon, Feb 20, 2006 at 07:42:50PM +0200, Giorgos Keramidas wrote: > On 2006-02-20 18:27, Divacky Roman <[EMAIL PROTECTED]> wrote: > > hi > > > > is is possible to set global LDFLAGS as its possible with CFLAGS? > > Yes, but why would you want to do t

LDFLAGS setting

2006-02-20 Thread Divacky Roman
hi is is possible to set global LDFLAGS as its possible with CFLAGS? thnx roman ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: different behaviour on fbsd and linux

2006-02-19 Thread Divacky Roman
On Sat, Feb 18, 2006 at 01:43:30PM -0800, John-Mark Gurney wrote: > Divacky Roman wrote this message on Sat, Feb 18, 2006 at 18:39 +0100: > > On Sat, Feb 18, 2006 at 06:21:52PM +0100, [EMAIL PROTECTED] wrote: > > > On Sat, Feb 18, 2006 at 06:17:18PM +0100, Divacky Roman wrote: &

Re: different behaviour on fbsd and linux

2006-02-18 Thread Divacky Roman
On Sat, Feb 18, 2006 at 06:21:52PM +0100, [EMAIL PROTECTED] wrote: > On Sat, Feb 18, 2006 at 06:17:18PM +0100, Divacky Roman wrote: > > execl("/bin/ls", NULL); > > This is wrong. You must specify arg0 != NULL (POSIX says so) and you > must NULL-terminate th

different behaviour on fbsd and linux

2006-02-18 Thread Divacky Roman
hi this simple program #include #include #include main() { pid_t pid; pid = fork(); if (pid == 0) execl("/bin/ls", NULL); } works differently on fbsd and on linux. on fbsd it basically ls each record in ENV on linux it executes ls listing all files in cwd. can someone expla

COMPAT_43

2005-12-13 Thread Divacky Roman
hi, the only use of COMPAT_43 (beside running 43 programs) is linux emulation layer and some tty-related stuff. but GENERIC etc. still shouts KEEP THIS on this option. is this necessary? forcing COMPAT_43 pesimises performnce (additional locking in some places etc.) and most users dont need it (

Re: Re: sysctl, HW_PHYSMEM, and crippled gcc

2005-12-10 Thread Divacky Roman
On Fri, Dec 09, 2005 at 02:02:25PM -0600, Sergey Babkin wrote: > >From: Divacky Roman <[EMAIL PROTECTED]> > > >On Thu, Dec 08, 2005 at 05:06:16PM -0800, Steve Kargl wrote: > >> Anyone have any insight into fixing gcc to make better > >> use of system memory

Re: sysctl, HW_PHYSMEM, and crippled gcc

2005-12-09 Thread Divacky Roman
On Thu, Dec 08, 2005 at 05:06:16PM -0800, Steve Kargl wrote: > Anyone have any insight into fixing gcc to make better > use of system memory on systems with more than 4 GB. > It appears that libiberty/physmem.c tries to use sysctl() > to determine the amount of physical memory in a system. > > {

Re: Re: system password's file

2005-10-15 Thread Divacky Roman
On Fri, Oct 14, 2005 at 04:24:05PM -0500, Matthew D. Fuller wrote: > On Fri, Oct 14, 2005 at 06:54:26AM -0500 I heard the voice of > Sergey Babkin, and lo! it spake thus: > > > > I don't know if it's fixed now or not. > > I just converted a Mandrake box a month or so ago, which used MD5 > hashes.

serial port question

2005-10-02 Thread Divacky Roman
Hi, I need to set serial port to given parity/speed/etc. and then cat from it... when I: stty -f /dev/cuaa0 speed 1200 its still at 9600 (the default setting) how do I alter speed of serial port? minicom/cu is able to do it but I want to do it via stty. how can this be done? thnx for answer r

dev_lock() question

2005-09-29 Thread Divacky Roman
Hi, dev_lock() looks this way: void dev_lock(void) { if (!mtx_initialized(&devmtx)) mtx_init(&devmtx, "cdev", NULL, MTX_DEF); mtx_lock(&devmtx); } I wonder why is the mtx_initialized checking necessary? shouldnt explicit initialization be sufficient? thnx for ans

Re: number of simultanously opened files

2005-08-23 Thread Divacky Roman
On Mon, Aug 22, 2005 at 02:06:45PM +0200, Dag-Erling Sm?rgrav wrote: > Divacky Roman <[EMAIL PROTECTED]> writes: > > witten ~# sysctl kern.maxfiles=10 > > kern.maxfiles: 10 -> 10 > > witten ~# sysctl kern.maxfilesperproc=10 > > kern.maxfiles

Re: number of simultanously opened files

2005-08-21 Thread Divacky Roman
On Sun, Aug 21, 2005 at 01:26:37PM +0300, victor cruceru wrote: > And errno (from a failed open) is ? sorry for not mentioning it... of course its: Too many open files (obtained by perror()) ___ freebsd-hackers@freebsd.org mailing list http://lists.

number of simultanously opened files

2005-08-21 Thread Divacky Roman
hi I wrote this: witten /tmp# cat x.c #include #include #include #define MAX 10 main() { int i = MAX; for (; i>0; i--) { if (open("/dev/null", O_RDONLY) == -1) { printf("FUCK: %i\n", MAX-i); p

[RFC] usr.bin patches for compilation with gcc 4.x

2005-08-11 Thread Divacky Roman
hi I made patches for usr.bin to compile with gcc4.x (tested with 4.1 snapshot), here it is: hysteria.sk/~neologism/find.patch hysteria.sk/~neologism/hexdump.patch hysteria.sk/~neologism/mkuzip.patch hysteria.sk/~neologism/tar.patch hysteria.sk/~neologism/wc.patch hysteria.sk/~neologism/window.pa

Re: How FREEBSD deals with request for continuous physical pages

2005-06-03 Thread Divacky Roman
On Fri, Jun 03, 2005 at 02:15:19AM -0700, Bao Zhao wrote: > Linux use buddy allocator.but I find it seems that > FREEBSD uses single page linked list. but SLAB and > some drivers need continuous physical pages, so I > wonder how FREEBSD solved this problem. man contigmalloc _

Re: cc1: internal compiler error: Abort trap: 6

2005-06-03 Thread Divacky Roman
On Thu, Jun 02, 2005 at 03:59:35PM -0700, Singh, Vijay wrote: > Hello, while doing a make buildkernel on a FreeBSD 6.0 system, I get a > compile failure in pf (depend): > > ===> pf (depend) > @ -> /usr/src/sys > machine -> /usr/src/sys/i386/include > echo "#define DEV_PF 1" > opt_pf.h > echo "#def

Re: ffs snapshots

2005-05-10 Thread Divacky Roman
On Mon, May 09, 2005 at 09:43:02AM -0600, Siddharth Aggarwal wrote: > > Hi, > > I was wondering why the limit for file system snapshots in BSD 5 has been > set to 20. Is it a limitation due to the way this feature has been > implemented? use the force, read the source ;) /* * The maximum nu

Re: A bit confused with the sched_4bsd.c code

2005-05-06 Thread Divacky Roman
On Fri, May 06, 2005 at 09:39:21AM +0200, [EMAIL PROTECTED] wrote: > > > >Halil Demirezen wrote: > >> Hello, > >> > >> First of all, I am not sure if this is the correct mail list with posting > >this > >> mail. I apologize for that.. Second, I may seem to have little > >> C knowledge, though

Re: C-style expression processing...

2005-04-25 Thread Divacky Roman
On Sun, Apr 24, 2005 at 10:50:16PM -0700, Ron Chen wrote: > Hi, > > I am trying to add a new feature in Gridengine > (free/opensource) to support ex-LSF users - there are > more and more LSF users migrating to Gridengine), and > some requested this one: > > In LSF, a user can specify from the com

Re: do-nothing code in sysv_shm.c

2005-04-12 Thread Divacky Roman
On Mon, Apr 11, 2005 at 08:03:24PM +0400, Vladislav Shabanov wrote: > I`ve found the following code in sysv_shm.c : > > > static void > shminit() > { > int i; > > TUNABLE_INT_FETCH("kern.ipc.shmmaxpgs", &shminfo.shmall); > for (i = PAGE_SIZE; i > 0; i--) { >

Re: What is the best way to introduce delay in kernel ?

2005-04-12 Thread Divacky Roman
On Tue, Apr 12, 2005 at 06:01:52PM +0530, Dipjyoti Saikia wrote: > Hi , > > I am writing a device driver and using DELAY() to intoduce delays in > my code .Are there any better ways of doing the same for FreeBSD 4.10 > ? you can use [tm]sleep for this... or with another approach callouts might

Re: organization

2005-03-29 Thread Divacky Roman
> The biggest problem is keeping history here. Doing something like that > with CVS is a major PITA. We didn't have any old release, so moving > the repository files didn't create a problem. That's impossible in > FreeBSD land :) wasnt here some discussion about moving FreeBSD to subversion (as so

Re: TX rate problem in hostap mode

2005-02-02 Thread Divacky Roman
On Tue, Feb 01, 2005 at 02:22:22PM -0800, Sam Leffler wrote: > Paulo Fragoso wrote: > >Hi, > > > >We are using a Samsung wireless card (PRISM2) with FreeBSD 5.3 in hostap > >mode and client is running FreeBSD 5.3 with Orinoco wireless card, all > >works fine but tx rate at hostap it is all time i

removing dependancy on COMPAT_43 from linuxator

2004-10-26 Thread Divacky Roman
Hi I wrote a patch which removes dependancy on COMPAT_43 from linux abi simulator. It introduces new option COMPAT_43FORLIN (name should be changed), ie. it peels of the kernel all the unecessary stuff noone these days use while keeping linux emulation working... its kern/73165, pls take a look

Re: new files in kernel build

2004-07-28 Thread Divacky Roman
On Tue, Jul 27, 2004 at 10:30:05AM -0700, Julian Elischer wrote: > > > M. Warner Losh wrote: > > >In message: <[EMAIL PROTECTED]> > > Divacky Roman <[EMAIL PROTECTED]> writes: > >: Hi, > >: > >: If I want to add some file

new files in kernel build

2004-07-27 Thread Divacky Roman
Hi, If I want to add some files into kernel sources, what am I supposed to do to them compile? I added some into sys/net80211/ but they dont compile... I tried sys/conf/files but it does help, just prints a message about having it defined before... thnx for help roman __

bcopy issues...

2004-05-08 Thread Divacky Roman
Hi anyone has read http://gobsd.com/node/view/9 this seems quite serious and even if it wasnt we should have mmx (+xmm) capable bcopy routines... the code seems to be easily mergeable any comments? Roman Divacky ___ [EMAIL PROTECTED] mailing list http

precompiled headers

2004-03-27 Thread Divacky Roman
Hi I am wondering wheter there is a plan to use precompiled heades once the 3.4 gcc is imported. that should cut compile times... any thoughts? thnx roman ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To

KTRACE flags

2004-01-23 Thread Divacky Roman
Hi Is there any way how can I see which proceses are ktraced? It would be neat to have this feature... roman ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTE