Re: letting glabel recognise a media change

2010-09-30 Thread Ivan Voras
On 09/30/10 00:28, Matthew Jacob wrote: On 9/29/2010 2:45 PM, Andriy Gapon wrote: on 30/09/2010 00:12 Alexander Best said the following: hi there, i wanted to ask if it would be possible to asjust glabel so that e.g. inserting a new media into a dvd-drive gets recognised and glabel displays th

Re: letting glabel recognise a media change

2010-09-30 Thread Andriy Gapon
on 30/09/2010 01:28 Matthew Jacob said the following: > On 9/29/2010 2:45 PM, Andriy Gapon wrote: >> on 30/09/2010 00:12 Alexander Best said the following: >>> hi there, >>> >>> i wanted to ask if it would be possible to asjust glabel so that e.g. >>> inserting >>> a new media into a dvd-drive ge

Re: letting glabel recognise a media change

2010-09-30 Thread Matthew Jacob
We already have a 'retaste' command for gmultipath at Panasas. What announcement API would you like to add? If something like that was in place, I assure you that things would start to use it very quickly. It doesn't have to be a heavy "announcement API". Basically, something would have to

Re: letting glabel recognise a media change

2010-09-30 Thread Matthew Jacob
Oh? Why? I am not sure about this. Because, e.g. I don't see an easy way to know that media is changed in scsi_cd driver. That is, without polling. I don't consider polling to be an easy way for a number of reasons. ___ freebsd-current@freebsd.o

Re: Safe-mode on amd64 broken

2010-09-30 Thread David Naylor
On Thursday 30 September 2010 08:52:39 Alexander Motin wrote: > David Naylor wrote: > > On Thursday 30 September 2010 07:23:34 Alexander Motin wrote: > >> David Naylor wrote: > >>> On Wednesday 29 September 2010 18:25:13 Alexander Motin wrote: > David Naylor wrote: > > On Wednesday 29 Sept

Examining the VM splay tree effectiveness

2010-09-30 Thread Andre Oppermann
;ve hacked up a crude and somewhat mechanical patch to convert the vmmap and page VM structures to use RB trees, the vmmap part is not stable yet. The page part seems to work fine though. This is what I've hacked together so far: http://people.freebsd.org/~andre/vmmap_vmpage_stats-20100930.di

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Matthew Fleming
s for its internal housekeeping.  RB tree details: >  http://en.wikipedia.org/wiki/Red-black_tree > > I say hypothesis because I haven't measured the difference to an > RB tree implementation yet.  I've hacked up a crude and somewhat > mechanical patch to convert the vmmap

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Roman Divacky
y can be done > with standard RB tree accessors. Our standard userspace jemalloc > also uses RB trees for its internal housekeeping. RB tree details: > http://en.wikipedia.org/wiki/Red-black_tree > > I say hypothesis because I haven't measured the difference to an > RB tr

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Andre Oppermann
On 30.09.2010 18:37, Andre Oppermann wrote: Just for the kick of it I decided to take a closer look at the use of splay trees (inherited from Mach if I read the history correctly) in the FreeBSD VM system suspecting an interesting journey. Correcting myself regarding the history: The splay tree

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Andre Oppermann
ough. This is what I've hacked together so far: http://people.freebsd.org/~andre/vmmap_vmpage_stats-20100930.diff http://people.freebsd.org/~andre/vmmap_vmpage_rbtree-20100930.diff The diffs are still in their early stages and do not make use of any code simplifications becoming possibl

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Andre Oppermann
On 30.09.2010 19:24, Roman Divacky wrote: are you aware of Summer of Code 2008 project by Mayur Shardul? I remember that there was this project but I never saw any numbers or other outcome of it. Haven't checked p4 to look at the code though. -- Andre quoting: http://www.freebsd.org/project

Re: letting glabel recognise a media change

2010-09-30 Thread Alexander Motin
Andriy Gapon wrote: > on 30/09/2010 01:28 Matthew Jacob said the following: >> If something like that was in place, I assure you that things would start to >> use >> it very quickly. > > I am not sure about this. > Because, e.g. I don't see an easy way to know that media is changed in scsi_cd > d

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Roman Divacky
On Thu, Sep 30, 2010 at 07:46:32PM +0200, Andre Oppermann wrote: > On 30.09.2010 19:24, Roman Divacky wrote: > >are you aware of Summer of Code 2008 project by Mayur Shardul? > > I remember that there was this project but I never saw any numbers > or other outcome of it. Haven't checked p4 to loo

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Ivan Voras
On 09/30/10 18:37, Andre Oppermann wrote: > Both the vmmap and page table make use of splay trees to manage the > entries and to speed up lookups compared to long to traverse linked > lists or more memory expensive hash tables. Some structures though > do have an additional linked list to simplif

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Roman Divacky
On Thu, Sep 30, 2010 at 07:49:00PM +0200, Roman Divacky wrote: > On Thu, Sep 30, 2010 at 07:46:32PM +0200, Andre Oppermann wrote: > > On 30.09.2010 19:24, Roman Divacky wrote: > > >are you aware of Summer of Code 2008 project by Mayur Shardul? > > > > I remember that there was this project but I n

sysctls in kern_shutdown: add twin tunables

2010-09-30 Thread Andriy Gapon
http://people.freebsd.org/~avg/kern_shutdown-tunables.diff The above patch adds twin tunables for the following (R/W) sysctls: - debug.debugger_on_panic - debug.trace_on_panic - kern.sync_on_panic This seems useful to me, but I am not sure if I am not missing something important. E.g. security-

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Alan Cox
On Thu, Sep 30, 2010 at 12:37 PM, Andre Oppermann wrote: > On 30.09.2010 18:37, Andre Oppermann wrote: > >> Just for the kick of it I decided to take a closer look at the use of >> splay trees (inherited from Mach if I read the history correctly) in >> the FreeBSD VM system suspecting an interest

Re: sysctls in kern_shutdown: add twin tunables

2010-09-30 Thread Robert N. M. Watson
On 30 Sep 2010, at 19:19, Andriy Gapon wrote: > http://people.freebsd.org/~avg/kern_shutdown-tunables.diff > > The above patch adds twin tunables for the following (R/W) sysctls: > - debug.debugger_on_panic > - debug.trace_on_panic > - kern.sync_on_panic > > This seems useful to me, but I am no

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Alfred Perlstein
Our standard userspace jemalloc > also uses RB trees for its internal housekeeping. RB tree details: > http://en.wikipedia.org/wiki/Red-black_tree > > I say hypothesis because I haven't measured the difference to an > RB tree implementation yet. I've hacked up a crude an

Re: letting glabel recognise a media change

2010-09-30 Thread Andriy Gapon
on 30/09/2010 20:46 Alexander Motin said the following: > Andriy Gapon wrote: >> on 30/09/2010 01:28 Matthew Jacob said the following: >>> If something like that was in place, I assure you that things would start >>> to use >>> it very quickly. >> >> I am not sure about this. >> Because, e.g. I do

Re: letting glabel recognise a media change

2010-09-30 Thread Andriy Gapon
on 30/09/2010 15:53 Matthew Jacob said the following: > > Oh? Why? In fact, I am not sure anymore :-) I had in mind some technical difficulties (like potential races with "normal" usage), but I think that they all are not very hard to overcome. Another question I had was how to poll, i.e. what co

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Andre Oppermann
On 30.09.2010 20:01, Alan Cox wrote: On Thu, Sep 30, 2010 at 12:37 PM, Andre Oppermann wrote: On 30.09.2010 18:37, Andre Oppermann wrote: Just for the kick of it I decided to take a closer look at the use of splay trees (inherited from Mach if I read the history correctly) in the FreeBSD VM

Re: letting glabel recognise a media change

2010-09-30 Thread Alexander Motin
Andriy Gapon wrote: > on 30/09/2010 20:46 Alexander Motin said the following: >> Andriy Gapon wrote: >>> on 30/09/2010 01:28 Matthew Jacob said the following: If something like that was in place, I assure you that things would start to use it very quickly. >>> I am not sure about th

Re: letting glabel recognise a media change

2010-09-30 Thread Doug Barton
On 9/29/2010 3:28 PM, Matthew Jacob wrote: On 9/29/2010 2:45 PM, Andriy Gapon wrote: on 30/09/2010 00:12 Alexander Best said the following: hi there, i wanted to ask if it would be possible to asjust glabel so that e.g. inserting a new media into a dvd-drive gets recognised and glabel displays

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Andre Oppermann
On 30.09.2010 20:38, Alfred Perlstein wrote: Andre, Your observations on the effectiveness of the splay tree mirror the concerns I have with it when I read about it. I have always wondered though if the splay-tree algorithm was modified to only perform rotations when a lookup required more than

Re: letting glabel recognise a media change

2010-09-30 Thread Dimitry Andric
On 2010-09-30 23:07, Doug Barton wrote: To what extent is HAL relevant here? I was sort of ambivalent about using it in FreeBSD, but my recent experimentation with ubuntu is starting to change my mind. Please read this first: https://wiki.ubuntu.com/Halsectomy :) _

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Attilio Rao
2010/9/30 Andre Oppermann : > On 30.09.2010 19:24, Roman Divacky wrote: >> >> are you aware of Summer of Code 2008 project by Mayur Shardul? > > I remember that there was this project but I never saw any numbers > or other outcome of it.  Haven't checked p4 to look at the code > though. The final

Re: letting glabel recognise a media change

2010-09-30 Thread Doug Barton
On 9/30/2010 2:29 PM, Dimitry Andric wrote: On 2010-09-30 23:07, Doug Barton wrote: To what extent is HAL relevant here? I was sort of ambivalent about using it in FreeBSD, but my recent experimentation with ubuntu is starting to change my mind. Please read this first: https://wiki.ubuntu.com/

Re: letting glabel recognise a media change

2010-09-30 Thread Doug Barton
On 9/30/2010 2:34 PM, Doug Barton wrote: On 9/30/2010 2:29 PM, Dimitry Andric wrote: On 2010-09-30 23:07, Doug Barton wrote: To what extent is HAL relevant here? I was sort of ambivalent about using it in FreeBSD, but my recent experimentation with ubuntu is starting to change my mind. Please

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Andre Oppermann
On 30.09.2010 20:04, Roman Divacky wrote: On Thu, Sep 30, 2010 at 07:49:00PM +0200, Roman Divacky wrote: On Thu, Sep 30, 2010 at 07:46:32PM +0200, Andre Oppermann wrote: On 30.09.2010 19:24, Roman Divacky wrote: are you aware of Summer of Code 2008 project by Mayur Shardul? I remember that t

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Andre Oppermann
On 30.09.2010 23:44, Andre Oppermann wrote: On 30.09.2010 20:04, Roman Divacky wrote: On Thu, Sep 30, 2010 at 07:49:00PM +0200, Roman Divacky wrote: On Thu, Sep 30, 2010 at 07:46:32PM +0200, Andre Oppermann wrote: On 30.09.2010 19:24, Roman Divacky wrote: are you aware of Summer of Code 2008

Re: letting glabel recognise a media change

2010-09-30 Thread Garrett Cooper
On Thu, Sep 30, 2010 at 2:38 PM, Doug Barton wrote: > On 9/30/2010 2:34 PM, Doug Barton wrote: >> >> On 9/30/2010 2:29 PM, Dimitry Andric wrote: >>> >>> On 2010-09-30 23:07, Doug Barton wrote: To what extent is HAL relevant here? I was sort of ambivalent about using it in FreeBSD, b

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Freddie Cash
For the curious, DragonflyBSD went through this back in 2005. All the gory details are in the thread with Subject: "splay tree and red-black tree for vm_map entry lookups" [1] While things are most likely different now between the FreeBSD VM and the DragonflyBSD VM, it may be worthwhile checking o

Re: letting glabel recognise a media change

2010-09-30 Thread Doug Barton
On 9/30/2010 3:20 PM, Garrett Cooper wrote: The problem is that the current system proposed for Device Kit is based on file system notification. I know we can do this with kqueues to some degree, but we do some of our best work via sysctls, and using other methods of attack, so it would be n

Re: Sleep/Lenovo SL410

2010-09-30 Thread Matt
Success! After setting every possible suspend/resume sysctl, "sysctl hw.pci.do_power_resume=0" allowed suspend and resume. Still beeps 1-3 times before suspend, with rapid sleep light flashing until suspend complete. Kernel conf is attached. World built from last Friday's CVS, -CURRENT acpic

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Matthew Dillon
I don't remember the reference but I read a comprehensive comparison between various indexing methods about a year ago and the splay tree did considerably better than a RB-tree. The RB-tree actually did fairly poorly. Any binary tree-like structure makes fairly poor use of cpu

Re: Examining the VM splay tree effectiveness

2010-09-30 Thread Adrian Chadd
On 1 October 2010 12:49, Matthew Dillon wrote: >    What turned out to be the best indexing mechanism was a chained >    hash table whos hoppers were small linear arrays instead of single >    elements.  So instead of pointer-chaining each element you have a small >    for() loop for 4-8 elements