Slashdot Mirror


Jeff Roberson Begins FreeBSD SMPng VFS Integration

A FreeBSD User writes "Jeff Roberson has announced that he has has begun integrating the Giant-lock free VFS code into the FreeBSD 6.x development tree. These changes will permit the UFS file system to run on multiple CPUs at a time on SMP systems (hyper-threaded, dual-core, or regular SMP), leading to substantially improved efficiency. It will also permit the VFS code to be fully preemptible on uni-processor systems, improving interrupt handling latency. With this change, almost all of the FreeBSD kernel is able to run fully threaded and in parallel on multiple CPUs with much less contention. He anticipates merging this work as an "opt-in" feature to the FreeBSD 5.x branch in the future. He indicates that the testing will be "opt-in", i.e., this change will not be fully enabled by default for the time being, and that it will take a while (a few hours) to complete the merge, so users of the 6-CURRENT branch may want to hold off updating for a few hours while he finishes the merge. The work was sponsored by Isilon Systems."

54 comments

  1. Nice idea. Linux? by redelm · · Score: 1
    I thought Linux went "giant lock free" somewhere around 2.4, but I'm not sure about the filesystems. Anyone know?

  2. BSD SMP VFS by Blakey+Rat · · Score: 4, Funny

    OMG WTF BSD SMP VFS? LOL!

    1. Re:BSD SMP VFS by Blakey+Rat · · Score: 0, Troll

      Kind of funny that my reply is the highest rated, and I didn't even have a clue what the story is talking about. (Nor did I read the entire thing.) Bravo, moderators.

  3. Offtopic? That's actually funny! by Anonymous Coward · · Score: 0

    come on. moderators.

    more stuff, because of the filter thing and such.

  4. Re:Nice idea. Linux? by FullMetalAlchemist · · Score: 1

    Actually, does it really matter?

    I doubt the lusers will switch to FreeBSD, ever. I'm happy with that, less is more.

  5. Interrupt Threads by bsd4me · · Score: 1

    It is interesting to see how and when various operating system concepts get implemented. Interrupt threads are a pretty common technique in realtime systems, and have been around since the early 90's or so; they were the first driver technique that I learned.

    --

    (S(SKK)(SKK))(S(SKK)(SKK))

    1. Re:Interrupt Threads by bsd4me · · Score: 1

      Oops... posted in the wrong tab... arg.

      --

      (S(SKK)(SKK))(S(SKK)(SKK))

    2. Re:Interrupt Threads by ASLRulz · · Score: 1

      Agreed! The FreeBSD 5.x distro has taken a lot of flack for how long it's taken to get to "Stable". This highlights why it is difficult to bring in change.

  6. Why not in 5.x tree? by theapodan · · Score: 2

    Why are they only incorporating this into the 6-current tree? I know that it says opt-in, but I think that a good number of hte changes in the 6-current should be in the 5.x too, like the wireless support and this.

    Anyone know why this is merged into the 6-current tree? Is it just for fear of new code in the -release, and a desire to backport tested fixes?

    1. Re:Why not in 5.x tree? by Geekboy(Wizard) · · Score: 4, Insightful

      because -stable is *NOT* the place for potentially destructive changes. it is possible that after this change has sat in -current for a few months, and its rock solid, it might be backported. Don't hold your breath though.

    2. Re:Why not in 5.x tree? by Anonymous Coward · · Score: 0

      I think the general idea is to form a development model more like what Linux does. You have a playground (6x) and things that work and improve get backported to the stable branch (5x). I don't know why Linus thinks it's such a great thing that he's f'ing around in the main Linux branch. The best thing he could do is get the hell OUT of 2.6 and branch to 2.7

    3. Re:Why not in 5.x tree? by Brandybuck · · Score: 4, Informative

      It's the difference between -STABLE and -CURRENT. The former only gets bug fixes, and if they've been tested to death, new drivers. As of 5.3, the 5.x branch became -STABLE, so for anything else, you have to use -CURRENT, and be patient and wait for 6.x to become STABLE.

      --
      Don't blame me, I didn't vote for either of them!
    4. Re:Why not in 5.x tree? by Anonymous Coward · · Score: 0

      Because distros and vendors (SGI/IBM/etc) are the ones who do the final QA anyway.

  7. Re:Nice idea. Linux? by ASLRulz · · Score: 1

    Linux is NOT giant Free. I believe Linus has stated that he sees no reason to be.

  8. Re:Dragonfly is the King of BSD SMP by archen · · Score: 3, Insightful

    In any case, if there is to be a FreeBSD 6.0 someday, it will probably look like Dragonfly. [dragonflybsd.org] I would say that future is now. Dragonfly 1.0 == FreeBSD 6.0

    Pfft, what are you smoking? Dragonfly and FreeBSD 6 are going to be nothing alike. FreeBSD 6x is basically a simple evolutionary step away from 5x and as such any fundamental design problems will remain. Dragonfly 1.0 is not really a complete OS so I'm not sure how you can compair it. Dragonfly is taking the 4x branch in a radically different direction and will probably be it's own different flavor within the next 2 years. That's basically like saying FreeBSD 6 == NetBSD 2.2 - the two aren't really similar enough to compair in such a fashion.

  9. Re:Dragonfly is the King of BSD SMP by MPHellwig · · Score: 1

    "Dragonfly 1.0 is not really a complete OS"
    I'm not running 1.0 but stable (well from a couple of months ago) but I wildly assume that you would think the same about it.

    So in that spirit I could conclude that I'm posting this from a non-complete OS on my notebook via wireless using X.org and mozilla. What is your definition of a complete OS?

    DragonFly will do anything FreeBSD 4 & 5 does, except for native ath perhaps.
    Give it a try, dowload the latest stable live/install CD ,play around with live and if you like use the same to install or leave it if you don't like it.
    The only thing you could loose is some time or interest in the other OS'es ;-)

  10. Re:Nice idea. Linux? by Anonymous Coward · · Score: 1, Informative

    There's still the giant lock (lock_kernel/unlock_kernel) but it keeps getting pushed farther down. At this point there aren't many performance critical parts that are still protected by it. Most of the huge-SMP work has moved on to other areas these days. There's still some activity though -- just in the last few weeks there were some changes to allow drivers to handle ioctl()'s without the giant lock.

    But yeah the core filesystem stuff has been outside the kernel lock for AGES. I'm actually pretty amazed that FreeBSD is that far behind.

  11. Re:Nice idea. Linux? by Homology · · Score: 2, Insightful
    This is old news in the Linux world, I'm glad you caught that. FreeBSD 5.x always impressed me as a catch-up "me too" effort to get where Linux was five years ago

    All the *BSD are trying to catch-up on the number of Linux kernel exploits, but so far they failing miserably. I, as a proud BSD user, DEMAND that I have the same excitement and the same feeling of clear and present danger that every Linux users experience on a daily basis. Oh man, it's sooooo booooring to have BSD boxen that just runs, and runs, and runs doing what it's supposed to do.

  12. Re:Nice idea. Linux? by moderators_are_w*nke · · Score: 4, Insightful

    I also think FreeBSD shot themselves in the foot by going with the MxN threading model, which sounds great in theory but's a real devil to get implemented to the point where it's correct and useful.

    Your kinda missing the point here. FreeBSD has got it implemented to the point where its correct and useful. Having done it kind of nullifies it the disadvantage of it being hard to do.

    --
    "XML is like violence. If it doesn't solve your problem, use more." - Anonymous Coward
  13. Re:Nice idea. Linux? by Fweeky · · Score: 1

    sudo echo "libpthread.so.1 libthr.so.1" >/etc/libmap.conf

    There's your 1:1 threading model. Are you going to tell us scheduler activations are bad now?

  14. Re:Dragonfly is the King of BSD SMP by archen · · Score: 2, Insightful

    I did try DragonFly, and basically found it to be 4x with a kick ass installer. I also found that a fair number of ports were broken, and I don't think hacking stuff together to get it to compile is a good solution. I also found a fair number of system utilities were broken (sockstat comes to mind), and got all sorts of crazy error messages in the system logs.

    I think the DragonFly team will do awsome things in the years to come, but there's a lot of work to do - the scope of the changes will be pretty large. DragonFly will really get off the ground once they make a clean break and import things from FreeBSD instead of the current method that comes across more like using FreeBSD as a crutch.

    And the sooner the other BSD's start using DragonFly's installer, the better.

  15. Re:Nice idea. Linux? by Anonymous Coward · · Score: 0

    Like OpenBSD, right?

  16. Re:Dragonfly is the King of BSD SMP by Kyro · · Score: 3, Informative

    If you want to give DragonFly another chance, I suggest you use NetBSD's pkgsrc instead of ports. It works perfectly for me.

    --
    save the GNUs!
  17. Re:Nice idea. Linux? by LuSiDe · · Score: 1

    You've never executed that command.

    FYI:
    $ sudo echo "hello" >test
    Password:
    $ ls -l test
    -rw-r--r-- 1 user group 6 Jan 25 00:24 test
    ..and its not owned by root. Tried it wish Tcsh and Bash. IIRC 'su' has the same problem (or 'behaviour'?).

    --
    WE DON'T NEED NO BLOG CONTROL.
  18. Re:Dragonfly is the King of BSD SMP by BossMC · · Score: 3, Insightful

    I am yet to see any concrete evidence that DragonFly is currently any better then FreeBSD in terms of performance, or anything for that matter.

    I believe that the greatest saying I have ever heard is "put up or shut up." DragonFlyBSD has not done this yet. Until a solid, QUANTITATIVE benchmark between FreeBSD and DragonFly has been made, every claim about DragonFlyBSD's success is premature, and a waste of people's time.

    Don't tell me that it's 10% faster. Show me. Show me this earth-changing code in action. I want proof, not an ad campaign.

  19. Re:Dragonfly is the King of BSD SMP by Anonymous Coward · · Score: 0

    That's a good point that I never thought of. You take a step down in the ammount of software available, but if it meets my needs that's all that matters. I'll give that a shot in the future.

  20. Re:Dragonfly is the King of BSD SMP by BossMC · · Score: 3, Insightful

    None of your links refer to DragonFlyBSD, which is what I was referring to.

    And at that its 2 processor scaling is something like 60%

    Link please.

  21. Re:Dragonfly is the King of BSD SMP by MPHellwig · · Score: 1

    I think your referring to 1.0 and not stable, but indeed there are a number of ports just plain broken or having unexpected behaviour.
    Although I have not met them yet (but me is not the best example).
    Perhaps you should indeed wait until another "full" release before trying it another time.

    >>"DragonFly will really get off the ground once they make a clean break and import things from FreeBSD instead of the current method that comes across more like using FreeBSD as a crutch."

    FreeBSD 4 and 5 have indeed (just like NetBSD and OpenBSD) been used for source importing but the last couple of month I have got the impression that there are more busy with fixing the partial mess and doing the layering for the true innovation what is taking place right at this very moment.
    IMHO the last couple of weeks it has been truly exciting to follow the mailinglist and watching the progress and potential folding out.
    I have every reason to belive that this will continue to do so.

    I like BSD systems and I am specially interested in DragonFly, but I use OpenBSD/NetBSD/FreeBSD too. I administer XP,2003, Solaris and sometimes Linux, I am concidering to get a mini-Mac to get some MacOSx knowledge.

    Every OS has it strongs and it weaks perhaps its the trick to use the right OS for the right situation (still learning that though).

    A note about the grammatics, english is not my first language neither my second so please don't let the spelling distract you from the meaning.

  22. Re:Nice idea. Linux? by Anonymous Coward · · Score: 0

    duh, it's not a problem. learn how shell redirection works some day.

  23. Same old Linux FUD. by Anonymous Coward · · Score: 0

    Same old GNU/Linux FUD, that has been disproved countless times...
    In short: the MIT research is *11 years old*, and that Rice study on the TCP/IP stack uses FreeBSD *2.2.6*

  24. Re:Nice idea. Linux? by Fweeky · · Score: 1

    My bad, the redirection is done by your shell. Try sudo sh -c 'echo "..." >/etc/libmap.conf' :)

  25. Re:Dragonfly is the King of BSD SMP by Anonymous Coward · · Score: 0

    I like BSD systems and I am specially interested in DragonFly, but I use OpenBSD/NetBSD/FreeBSD too. I administer Windows XP (Microsoft), Windows 2003 (Microsoft), Solaris and sometimes Linux, I am concidering to get a mini-Mac (Apple) to get some MacOSx knowledge.

  26. Re:Nice idea. Linux? by Anonymous Coward · · Score: 0

    The FreeBSD problem is that, over the years, there have been way too many FreeBSD SMP "cooks" and subsuquent "recipe" changes. SMP on FreeBSD has morphed this way and that several times. A lot of the old school guys moved on like John Dyson, Mike Smith, and Matt Dillon. Matt Dillon has moved on to take a new approach to SMP altogether. I really wish that the FreeBSD honchos would have given Matt a fair listen.

  27. Re:Dragonfly is the King of BSD SMP by Anonymous Coward · · Score: 0

    I'm rather fond of the OpenBSD "no bullshit" installer. Works well over serial port too.

  28. *sigh* by torstenvl · · Score: 1

    I am somewhat new to FreeBSD (I've only been using it for about a year) so I dont know what the early STABLEs are usually like, but 5.x really doesnt seem to have stabilized and I'm running out of patience. I really like BSD, because the system is just overall a lot cleaner than other Freenixen that I've used, but I really think it needs to boot on my laptop without setting:

    set hw.pci.enable_io_modes="0"

    Setting this really bothers me mostly because I don't know what it means.

    Of course, after that, inserting the kernel module for my sound card (snd_ich.ko) crashes the system...

    So for now I'm (malheureusement) stuck with 4.10.

    I get no response from -questions...

    1. Re:*sigh* by sirket · · Score: 1

      set hw.pci.enable_io_modes="0"
      You should try looking this up.

      5.3 is the first in the 5.x -STABLE branch. It's kind of like using the 1.0 version of software. It's the first branch considered to be stable but even then there could be gotcha's that no one has found. I'd wait until 5.4 before moving to it if this is a production machine or you are not willing to play with the system.

      -sirket

    2. Re:*sigh* by Anonymous Coward · · Score: 0

      For what it's worth, you should not use the 5.x branch because it is not stable yet. There are a whole lot of "gotchas" waiting to bite you in 5.3 unless you are a developer who can handle some problems. Best advice is to wait and stick with what works for you. No biggie.

    3. Re:*sigh* by Anonymous Coward · · Score: 0

      So WTF does that mean?

      "FreeBSD is a really stable operating system"

      "Er, don't use 5.3-STABLE, as it's not stable, it's not 5, and it's not a .3. It's really a 1.0"

      What a total fucking nightmare. Hey, I'd be first to agree that brand new early releases can have a few bugs. But for a bloody 5.3 release to have so many problems is NOT acceptable -- it's lame.

      Either create a stable release, or call them betas. You can't have it both ways.

    4. Re:*sigh* by Anonymous Coward · · Score: 0

      You can put hw.pci.enable_io_modes="0" in your /etc/loader.conf
      snd_ich is crashing cause BIOS didn't configure the sound card (happens when "PnP OS" settings is enabled).
      It was crashing my Toshiba until I disabled "PnP OS". I had to boot Windows to do this :(
      But it no longer crashes :)