DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 19th May 2008
n4uti1us n4uti1us is offline
New User
 
Join Date: May 2008
Location: Ireland
Posts: 3
Default Spin locks and interrupts disabling

Hi All,

I was looking at the linux kernel, and in the implementation of spinlocks, one can use different functions. One of them is spin_lock_bh(). What it does is it creates a spin lock and disables the software irqs.

In FreeBSD on the other hand, the implementation of spinlocks is done by mtx_lock_spin (which is actually a macro that calls mtx_lock_spin_flags()) but the problem is that is disables all the irq vector (at the bottom of the stack it executes an "cli"). Is there any way one can implement spinlocks that only disable the bottom half (sof irq)?

Alternatively, what would be the best way to manualy disable the soft irqs?

Thank you for reading.
Reply With Quote
  #2   (View Single Post)  
Old 19th May 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

For this rather technical issue you probably will get more response on a FreeBSD mailing list
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #3   (View Single Post)  
Old 20th May 2008
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Default

It was already there - silence was only response.

Use the source, Luke.

I doubt that comparing two kernels is usefull in any way.

Development approach is so different ....


[flame]Just look at Debian[/flame]
Reply With Quote
  #4   (View Single Post)  
Old 20th May 2008
n4uti1us n4uti1us is offline
New User
 
Join Date: May 2008
Location: Ireland
Posts: 3
Default

Quote:
Originally Posted by richardpl View Post
It was already there - silence was only response.

Use the source, Luke.

I doubt that comparing two kernels is usefull in any way.

Development approach is so different ....


[flame]Just look at Debian[/flame]
Hi richardpl.

I know the two kernels are fundamentaly different. And it seems like there is no concept of disabling the bottom half in FreeBSD, but I am not 100% sure about it. Have you ever come accros the concept of soft irqs in FreeBSD? If so do you know any way of disabling them?

Again, thank you for your time.
Reply With Quote
  #5   (View Single Post)  
Old 20th May 2008
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Default

The concept of mutex(9) and linux spinlocks is incompatible with each other. Well I never looked in linux kernel code (only in some drivers ...)

NOTE: I am not kernel developer of any OS, just boring user.
Reply With Quote
  #6   (View Single Post)  
Old 20th May 2008
n4uti1us n4uti1us is offline
New User
 
Join Date: May 2008
Location: Ireland
Posts: 3
Default

Bok richardpl!

The fact is that there is some correlation between the functionality (not implementation between the two kernels). But I wanted to go a bit further than that.

Thanks anyway for your help.

If anybody else can give a hand that would be greately appreciated.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ati hd3650 fan spin up/down ephemera General Hardware 4 14th April 2009 04:35 AM
Possible to idle / spin-down SCSI drives? sim FreeBSD General 3 6th November 2008 09:49 PM
disabling ctrl-c malindang FreeBSD General 3 27th June 2008 12:06 AM
Nagios 2.12 locks awd FreeBSD Ports and Packages 5 19th June 2008 10:38 AM


All times are GMT. The time now is 06:53 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick