Re: kern/104406 on 8.0-RELEASE-p2 ?

2010-04-09 Thread Victor Sudakov
Victor Sudakov wrote:
> > > I seem to have symptoms of kern/104406 on a 8.0-RELEASE-p2 system.
> > > After an uptime of several days, many processes get stuck in the "ufs"
> > > state.  The processes which had already opened some files before the
> > > deadlock continue working all right, e.g. my old login sessions are
> > > functional but I cannot start a new ssh session to the box.
> > >
> > > Can you advise me a workaround?
> > >
> > > The box is being used as a BGP (quagga) router with two full views.
> > > Hardware configuration is below:
> > >
> 
> [dd]
> 
> > 
> > Do you have disable the flowtable options?
> > 
> > # sysctl net.inet.flowtable.enable=0
> > net.inet.flowtable.enable: 1 -> 0
> > 
> >   This feature is default since 8 release, but is not good for bgp full
> > routing.
> 
> It seems to be a different issue, kern/144917 related, but a good idea
> anyway to set net.inet.flowtable.enable=0. Thank you for the reminder. 
> 
> However, my box does not crash or lock up hard, just some processes
> lock up in the "ufs" state and other processes cannot access files.

With net.inet.flowtable.enable=0 the box has been working for a week
already without lockups. Is this flowtable really the cause of the
problem, or is it a coincidence?

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
sip:suda...@sibptus.tomsk.ru
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


make pkg_install suite reusable, please

2010-04-09 Thread Leinier Cruz Salfran
hello fbsd devs

i want to ask you one thing: can you make the 'pkg_install' suite
reusable .. means install 'libinstall.a' as a shared object in order
to make it reusable by others devs

i'm developing a packages manager and i borrow almost all
'pkg_install' in order to be able to do things related to packages
such as install, delete, compare versions, etc... but i made some
modifications because i put all code together, so, i changed
'pkg_perform' function by their respective

well waiting.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: make pkg_install suite reusable, please

2010-04-09 Thread Alexander Churanov
2010/4/9 Leinier Cruz Salfran 

> i want to ask you one thing: can you make the 'pkg_install' suite
> reusable .. means install 'libinstall.a' as a shared object in order
> to make it reusable by others devs
>

Hi Leinier,

I'd like to add my 50 cents. From my point of view, the true UNIX way is
re-using whole programs. This provides unbelievable isolation and
correctness. If you don't want to fork myriads of processes each second,
then, it's, probably, better to ask for pipe mode of pkg_* tools. For
example, aspell works that way. You start a process, write commands and
queries and read results.

Alexander Churanov
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: make pkg_install suite reusable, please

2010-04-09 Thread Alexander Churanov
Leinier,

I forgot to mention that character-mode IO also resolves all binary
compatibility issues and makes possible implementing wrappers for any
programming language much easier.

Alexander Churanov
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


c question

2010-04-09 Thread Leinier Cruz Salfran
hello all

i want to know your oppinions about this:

- use a matrix is faster than use a linked list?


example:

char *szColumnName[10];
unsigned short iColumnAge[10];


struct _llList {
  struct _llList *prev, *next;
  char szName[64];
  unsigned short iAge;
};
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: c question

2010-04-09 Thread Alexander Churanov
2010/4/9 Leinier Cruz Salfran 

> - use a matrix is faster than use a linked list?
>
> example:
>
> char *szColumnName[10];
> unsigned short iColumnAge[10];
>
>
> struct _llList {
>  struct _llList *prev, *next;
>  char szName[64];
>  unsigned short iAge;
>  };


Leinier ,

This depends on what kind of operations are performed. For sequential
traversing, both are very appropriate. However, you can not perform a binary
search on a list. You also can not combine two arrays into a single one with
constant complexity.

Lists also have greater memory overhead for small structures.

My advice: always use arrays.
Use lists if:

1) Copying items when the dynamic arrays grows is inappropriate.
2) List-specific operations like O(1) splicing or O(1) insertions and
deletions are required.

Alexander Churanov
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


C6 sleep state

2010-04-09 Thread Sean Bruno
Has anyone worked on code for the C6 power state for the Intel Nehalem
processors yet?

http://download.intel.com/design/processor/applnots/320354.pdf

Sean


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


Re: make pkg_install suite reusable, please

2010-04-09 Thread Leinier Cruz Salfran
On Fri, Apr 9, 2010 at 10:38 AM, Alexander Churanov
 wrote:
> Leinier,
>
> I forgot to mention that character-mode IO also resolves all binary
> compatibility issues and makes possible implementing wrappers for any
> programming language much easier.
> Alexander Churanov
>

hello alexander

that is the 'easy' way .. but I'm a dev and I want to have 'full
control' of what my program is doing .. the 'best' and 'hard' way is
to code my program with functions provided by the other dev in which i
can catch errors, customize output, bla bla bla

well .. i ask this because i'm creating a program in which i must to
use pkg_* .. i'll borrow the 'entire' pkg_* source code and customize
to fit my needs

thanks anyway
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: c question

2010-04-09 Thread Leinier Cruz Salfran
On Fri, Apr 9, 2010 at 10:52 AM, Alexander Churanov
 wrote:
> 2010/4/9 Leinier Cruz Salfran 
>>
>> - use a matrix is faster than use a linked list?
>>
>> example:
>>
>> char *szColumnName[10];
>> unsigned short iColumnAge[10];
>>
>>
>> struct _llList {
>>  struct _llList *prev, *next;
>>  char szName[64];
>>  unsigned short iAge;
>>  };
>
>
> Leinier ,
> This depends on what kind of operations are performed. For sequential
> traversing, both are very appropriate. However, you can not perform a binary
> search on a list. You also can not combine two arrays into a single one with
> constant complexity.
> Lists also have greater memory overhead for small structures.
> My advice: always use arrays.
> Use lists if:
> 1) Copying items when the dynamic arrays grows is inappropriate.
> 2) List-specific operations like O(1) splicing or O(1) insertions and
> deletions are required.
> Alexander Churanov
>

hello alexander

i supposed that a matrix is much faster .. i coded my program to use
matrix in that portion but i sent the question to see what others
think about this

thanks
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: c question

2010-04-09 Thread KAYVEN RIESE

On Fri, 9 Apr 2010, Leinier Cruz Salfran wrote:


hello all

i want to know your oppinions about this:

- use a matrix is faster than use a linked list?


yes.




example:

char *szColumnName[10];
unsigned short iColumnAge[10];


struct _llList {
 struct _llList *prev, *next;
 char szName[64];
 unsigned short iAge;
};
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"



*--*
  Kayven Riese, BSCS, MS (Physiology and Biophysics)
  (415) 902 5513 cellular
  http://kayve.net
  Webmaster http://ChessYoga.org
*--*
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: make pkg_install suite reusable, please

2010-04-09 Thread Garrett Cooper
On Fri, Apr 9, 2010 at 10:38 AM, Leinier Cruz Salfran
 wrote:
> On Fri, Apr 9, 2010 at 10:38 AM, Alexander Churanov
>  wrote:
>> Leinier,
>>
>> I forgot to mention that character-mode IO also resolves all binary
>> compatibility issues and makes possible implementing wrappers for any
>> programming language much easier.
>> Alexander Churanov
>>
>
> hello alexander
>
> that is the 'easy' way .. but I'm a dev and I want to have 'full
> control' of what my program is doing .. the 'best' and 'hard' way is
> to code my program with functions provided by the other dev in which i
> can catch errors, customize output, bla bla bla
>
> well .. i ask this because i'm creating a program in which i must to
> use pkg_* .. i'll borrow the 'entire' pkg_* source code and customize
> to fit my needs

Work is being done by several individuals to make this a reality,
but it's going to take time.
Thanks,
-Garrett
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: make pkg_install suite reusable, please

2010-04-09 Thread Charlie Kester

On Fri 09 Apr 2010 at 07:36:17 PDT Alexander Churanov wrote:

2010/4/9 Leinier Cruz Salfran 


i want to ask you one thing: can you make the 'pkg_install' suite
reusable .. means install 'libinstall.a' as a shared object in order
to make it reusable by others devs



Hi Leinier,

I'd like to add my 50 cents. From my point of view, the true UNIX way is
re-using whole programs. This provides unbelievable isolation and
correctness. If you don't want to fork myriads of processes each second,
then, it's, probably, better to ask for pipe mode of pkg_* tools. For
example, aspell works that way. You start a process, write commands and
queries and read results.


+1

It was a watershed moment in my programming career when I realized that
the bubbles on those DFD charts we used to use for structured design
could be whole processes and not just functions in a single, monolithic
program.  


Suddenly everything the structured design folks were saying about
re-use, encapsulation, loose coupling, module cohesion, etc. made a lot
more sense when viewed from the perspective of simple Unix utilities
communicating with plain text via pipes. 


We should encourage that approach as a default, and only put things into
binary libraries when forced to by performance considerations.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: make pkg_install suite reusable, please

2010-04-09 Thread Garrett Cooper
On Fri, Apr 9, 2010 at 11:51 AM, Charlie Kester  wrote:
> On Fri 09 Apr 2010 at 07:36:17 PDT Alexander Churanov wrote:
>>
>> 2010/4/9 Leinier Cruz Salfran 
>>
>>> i want to ask you one thing: can you make the 'pkg_install' suite
>>> reusable .. means install 'libinstall.a' as a shared object in order
>>> to make it reusable by others devs
>>>
>>
>> Hi Leinier,
>>
>> I'd like to add my 50 cents. From my point of view, the true UNIX way is
>> re-using whole programs. This provides unbelievable isolation and
>> correctness. If you don't want to fork myriads of processes each second,
>> then, it's, probably, better to ask for pipe mode of pkg_* tools. For
>> example, aspell works that way. You start a process, write commands and
>> queries and read results.
>
> +1
>
> It was a watershed moment in my programming career when I realized that
> the bubbles on those DFD charts we used to use for structured design
> could be whole processes and not just functions in a single, monolithic
> program.
> Suddenly everything the structured design folks were saying about
> re-use, encapsulation, loose coupling, module cohesion, etc. made a lot
> more sense when viewed from the perspective of simple Unix utilities
> communicating with plain text via pipes.
> We should encourage that approach as a default, and only put things into
> binary libraries when forced to by performance considerations.

It makes more sense here though because it can be used by the existing
tools, it can be linked into other applications (that it makes sense
to do so), like sysinstall (or its successor), and there's been some
talk about splitting up pkg_install into two separate pieces, one for
handling the low-level packaging tasks, and the other for handling the
user-facing pieces.

Thanks,
-Garrett
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"