2010
03.01

It was recently noted that ioctl() system calls are still executed with the Big Kernel Lock (BKL) held. A suggestion was made that drivers which can implement ioctl() without the BKL held should be specially flagged as a way of increasing parallelism. That suggestion looks like it will not get very far. But it did pique your editor’s interest in current use of the BKL. Besides, there hasn’t been a whole lot else going on this week.

The BKL is an artifact from when the Linux kernel first supported multiprocessor systems. Making the kernel safe for concurrent access from multiple CPUs has been a multi-year task; it is not a job that could have been done all at once at the beginning. So Linux 2.0 supported SMP systems by way of the BKL, which only allowed one processor to be running kernel code at any given time. The BKL is essentially a spinlock, but with a couple of interesting properties:

  • The BKL can be taken recursively; the kernel remembers how many times a given thread has called lock_kernel() and does the right thing. Normal spinlocks are rather less forgiving.
  • Code holding the BKL can sleep. The lock is released while the given thread sleeps, and reacquired upon awakening.

The BKL made SMP Linux possible, but it didn’t scale very well. Its overhead could be felt even with two processors, and it made running on anything larger problematic. So the kernel developers have been breaking the BKL into finer-grained locks ever since. Thus, for example, the block I/O subsystem went from the BKL to its own lock (io_request_lock) in 2.2, and from that to individual queue locks in 2.6. The kernel now has thousands of locks, and some people had assumed that the BKL would be gone by 2.6.

As it turns out, there are still over 500 lock_kernel() calls in the 2.6.6 kernel. For the curious, here are some of the places which still rely on this old, system-wide lock:

  • The core kernel retains a few calls. The implementation of the reboot() system call is one of them; this is, of course, not one of the more performance-sensitive parts of the kernel. The boot-time early initialization process is also run with the BKL held. The sysctl() system call is run under the BKL; interestingly, while much of /proc is also implemented under the BKL, it appears that reads and writes to /proc/sys do not run with the BKL held.
  • Many older filesystems (UFS, coda, HPFS, FAT, NCP, SMB, Minix, etc.) make heavy use of the BKL for serialization. The UnixWare “Boot File System” implementation has several calls; somehow, they seem unlikely to be fixed anytime soon. There are also lock_kernel() calls in NFS, UDF, isofs, the reiserfs journaling code, autofs, and some others. The ext2 filesystem uses the BKL to protect modifications to the superblock; ext3, instead, had all of its lock_kernel() calls purged during the 2.5 development process.
  • The rpciod kernel thread spends its entire life with the BKL held.
  • Core dumps are created with the BKL held.
  • Block and character devices have their open() methods called under the BKL. Block release() methods are also called this way, but that is not true for char drivers. The default llseek() method runs under the BKL, but, if a driver or filesystem provides its own llseek() method, that method will not be called with the BKL held. The fasync()  method is always called under the BKL. As noted at the beginning, ioctl() methods are called with the lock held; additionally, the ugly code which does 32-bit emulation on 64-bit systems needs the BKL.
  • The file locking code still requires the BKL.
  • Almost 10% of the lock_kernel() calls can be found in the (old, deprecated) OSS sound code. The ALSA code has no BKL calls, with one exception: the implementation of its /proc files.
  • Most of the architectures retain some calls in the arch-specific code. The ptrace() system call is one common place for these calls. i386 also uses the BKL to protect llseek() calls on the CPUID and MSR pseudo-devices. uClinux performs execve()  calls under the BKL.
  • Almost all of the remaining BKL calls are to be found in device drivers. The TTY subsystem still has quite a few of them, as does USB. Many of these calls are protecting llseek()  implementations. Quite a few of the rest are for the creation of special-purpose kernel threads: the daemonize() function needs to be called with the BKL held. Those calls can, presumably, go away as the driver code is (slowly) migrated over to the new kthread calls.

Given how poorly the BKL is viewed, it may be surprising that so many places in the kernel still use it. The simple fact is that, with regard to the BKL, all of the low-hanging fruit has long since been taken. For most of the remaining calls, removing the BKL is not worth the trouble and code churn. So, while removal of the remaining calls over the 2.7 development series looks entirely possible, it would not be surprising if that does not happen.

http://lwn.net/Articles/86859/

VN:F [1.8.4_1055]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.4_1055]
Rating: 0 (from 0 votes)
2010
01.20

Linux kernel comment…

/*
* It would make sense to put struct rusage in the task_struct,
* except that would make the task_struct be *really big*.  After
* task_struct gets moved into malloc’ed memory, it would
* make sense to do this.  It will make moving the rest of the information
* a lot simpler!  (Which we’re not doing right now because we’re not
* measuring them yet).
*
* When sampling multiple threads for RUSAGE_SELF, under SMP we might have
* races with threads incrementing their own counters.  But since word
* reads are atomic, we either get new values or old values and we don’t
* care which for the sums.  We always take the siglock to protect reading
* the c* fields from p->signal from races with exit.c updating those
* fields when reaping, so a sample either gets all the additions of a
* given child after it’s reaped, or none so this sample is before reaping.
*
* Locking:
* We need to take the siglock for CHILDEREN, SELF and BOTH
* for  the cases current multithreaded, non-current single threaded
* non-current multithreaded.  Thread traversal is now safe with
* the siglock held.
* Strictly speaking, we donot need to take the siglock if we are current and
* single threaded,  as no one else can take our signal_struct away, no one
* else can  reap the  children to update signal->c* counters, and no one else
* can race with the signal-> fields. If we do not take any lock, the
* signal-> fields could be read out of order while another thread was just
* exiting. So we should  place a read memory barrier when we avoid the lock.
* On the writer side,  write memory barrier is implied in  __exit_signal
* as __exit_signal releases  the siglock spinlock after updating the signal->
* fields. But we don’t do this yet to keep things simple.
*
*/

VN:F [1.8.4_1055]
Rating: 7.0/10 (1 vote cast)
VN:F [1.8.4_1055]
Rating: +1 (from 1 vote)
2009
11.06

Old Skul

Cooh
/ Position Chrome, H.M.S.U. :: Bulgaria /

Mocks
/ H.M.S.U. :: Bulgaria /

Konspirator
/ H.M.S.U. :: Bulgaria /

Targy
/ H.M.S.U. :: Bulgaria /

acidtrip
/ H.M.S.U. :: Bulgaria /

EXo
/ H.M.S.U. :: Bulgaria /

visuals by kmn / blender.cult.bg

entrance before 00:00:
6 BGN

entrance after 00:00:
8 BGN

start:
23:00h

end:
06:00h

!!! ALL YOUNG TALENT IS WELCOME TO TRY THEIR AUTHOR TRACKS BEFORE THE EVENT – STARTING 20:00

Събитието ще се проведе в най-голямата – Бяла Зала!

party dress code
white media-popular head masks :)

VN:F [1.8.4_1055]
Rating: 10.0/10 (3 votes cast)
VN:F [1.8.4_1055]
Rating: +3 (from 3 votes)
2009
10.02

100% DNB

hmsu room:

Cooh

/ Position Chrome, H.M.S.U. :: Bulgaria /

Ogonek

/ Metafiziq, H.M.S.U. :: Bulgaria /

Mocks

/ H.M.S.U. :: Bulgaria /

Konspirator

/ H.M.S.U. :: Bulgaria /

Targy

/ H.M.S.U. :: Bulgaria /

acidtrip

/ H.M.S.U. :: Bulgaria /

EXo

/ H.M.S.U. :: Bulgaria /

visuals by kmn / blender.cult.bg


nu blood room:

Thought

/ Tech Itch, Freak :: Bulgaria /

Digital Soul

/ Metafiziq, Wayside, HMSU.net :: Bulgaria /

Broozy

/ Nextstation :: Bulgaria /

Charoday

/ Chronic Vibez :: Bulgaria /

Subzter

/ Bulgaria /

Yango

/ Bulgaria /

entrance before 00:00:
8 BGN

entrance after 00:00:
10 BGN

start:
22:30h

end:
06:00h

!!! ALL YOUNG TALENT IS WELCOME TO TRY THEIR AUTHOR TRACKS BEFORE THE EVENT – STARTING 21:00

VN:F [1.8.4_1055]
Rating: 9.0/10 (2 votes cast)
VN:F [1.8.4_1055]
Rating: +2 (from 2 votes)
2009
09.28

Програмистът Линус Торвалдс, който преди около 18 години инициира създаването на операционната система Linux, определи сегашния вид на Linux – ядрото като “раздуто и огормно”. Това стана по време на кръгла маса, в рамките на конференцията LinuxCon в САЩ.

Модераторът на дискусията – Джеймс Ботъмли от компанията Novell – цитира вътрешно изследване на Intel, според което производителността на Linux пада с два процента с всеки нов релийз. Така общото понижение на производителността за последните десет релийза е достигнало 12 процента.

Според Торвалдс, версия 2.6.31 на Linux – ядрото силно се различава от бързата и компактна версия 0.01, която той е написал преди 18 години. Нещо повече – той изрази убеждението си, че днес обществото, подкрепящо тази операционна система не разполага с план за промяна на ситуацията.

Все пак легендарният програмист е останал доволен от стабилността на текущата версия на Linux – ядрото, както и от бързината, с която разработчиците се справят с откритите в системата грешки.

източник: linux-bg.org

VN:F [1.8.4_1055]
Rating: 9.0/10 (3 votes cast)
VN:F [1.8.4_1055]
Rating: +1 (from 1 vote)
2009
08.16

Arts Forum Festival

August 22, 2009

Varna, Seagarden Casino /big hall/


11:30 – 00:30 – EXo (dubstep & jungle / HMSU, Mirizma)
00:30 – 01:30 – acidtrip (jungle & dubrock, / HMSU )
01:30 – 02:30 – Mocks (techstep & classics / HMSU, T-Free )
02:30 – 03:30 – COOH (hard style & digital hardcore / HMSU, Offkey)
03:30 – 04:30 – Ogonek (technoid / HMSU, Metafiziq)
04:30 – 05:30 – Targy (techstep / HMSU)
05:30 – 06:30 – Konspirator (jump up & wobble / HMSU)

WORKSHOPS:

16.00 – 16.30 :: First steps with the Skyrunner (with Misho)
16.30 – 17.15 :: Basic mixing concepts (with Konspirator)
17.30 – 18.00 :: How do I release my tracks? (with Ogonek + CoоH)
18.15 – 19.00 :: Getting to know some important DNB labels (with Тарги)
19.15 – 20.00 :: Intro to generative arts ( with ЕХо )

VN:F [1.8.4_1055]
Rating: 10.0/10 (1 vote cast)
VN:F [1.8.4_1055]
Rating: +1 (from 1 vote)
2009
08.01

iPod Touch on Linux

My kid just got one for Christmas, and it didn’t work out of the box, insists that you connect it to iTunes first, stupidly blinking a USB logo at you. Well, we don’t have Windows or Mac at home, and thus no iTunes. Took it to an Apple store “Genius Bar”, where the “genius” unlocked the thing, and then started some inane argument about how great iTunes is. What a dork. Anyway, it now surfs the web just fine, plays youtube videos, etc. but for the life of me, I can’t figure out how to download music onto the thing.

This thread suggests “jailbreaking”, but other threads suggest that jailbreaking will void warranty. So:

1) Is there a non-warranty-voiding jailbreak now available?
2) Can I get someone at the Apple store Genuis bar to perform this for me?
3) Besides a jailbreak, are there any other alternatives?

This is like the most expensive gift my 13-year-old has ever gotten, and its been tears and strife and emotional breakdown with both kid and wife since then; my wife is taking this a lot harder than the kid, who sort of glumly holds out hope. This is far and away the suckiest Christmas present of all time, but I’m in this for the long haul, and want to make it right. So, (aside from installing a pirated copy of WinXP under VirtualBox to run #$%^ iTunes), what are the options?

VN:F [1.8.4_1055]
Rating: 8.5/10 (2 votes cast)
VN:F [1.8.4_1055]
Rating: +1 (from 1 vote)
2009
07.06

За девета поредна година Летният Дръм енд Бейс Фестивал на Открито организиран от Hard Music And Sounds United (H.M.S.U., www.hmsu.org) привлече стотици фенове на танцувалната електронна музика.

От 3 до 5 юли над с.Кътина, в продължение на 40 часа представиха в над 30 изпълнения на сцена своите футуристични музикални изпълнения родни и чужди артисти.

Тазгодишното издание се отличава с международни присъствие както на 15 гост артиста от Европа и света, така и на многобройни фенове от Гърция, Румъния, и Испания.

Посетителите бяха безмилостно облъчвани с бас вибрации подредени в ударни структури – комбинация, която докарваше публиката до екстаз. Феновете неуморно подкрепяха артистите до изгрев слънце, а в периметъра на звуковата система всички танцуваха.

Като първокласен определиха фестивала мнозина от запитаните на място. Интерес към събитието имаше от цялата страна. В приятната атмосфера на фестивала бе очевидно, че коренно различни хора могат да се срещнат и забавляват заедно в една съвсем различна музикална среда.

На мястото на събитието имаше и разнообразни дейности като акробатични демонстрации, графити сесия и хек състезание на мрежа. Безплатно можеше да бъде ползвана и свободно достъпна високоскоростна Интернет връзка.

Организаторите предоставиха достатъчно безплатни дърва за огрев на посетителите и за двете вечери. Междувременно доброволци и организатори се грижеха за изрядната чистота в зоната на фстивала. Всеки пушач получи и своя личен пепелник под формата на пластмасова епруветка.

H.M.S.U. поздравява феновете на дръм енд бейс музиката и изразява благодарност на всички взели участие с доброволен труд. Следващото участие на организацията е по време на Spirit of Burgas.

VN:F [1.8.4_1055]
Rating: 10.0/10 (2 votes cast)
VN:F [1.8.4_1055]
Rating: +2 (from 2 votes)
2009
06.09

3-5.July.2009 :: Kutina Village, 10 km from Sofia


special guests:

Taxman and MC Det

/ Ganja Records, UK /


Break

/ DNAudio, UK /


Audio

/ Tech-Freak, UK /


Capital J

/ VIP Dubz, Canada /


Dean Rodell

/ Subdivision, The Dying Punks, Offkey, Germany /


Thrasher

/ PRSPCT, NL /


Underhill

/ Dean Rodell b2b Cooh, Subtrakt, Subdivision /


balkanz:

Disphonia

/ Funxion, GR /

Harris b2b Kernelcoremode

/ Funxion, Creative Space, GR /

Numark b2b Abend

/ Funxion, GR /

Elephant Phinix MC

/ GR /

Treo

/ Temper D Production, Serbia /


localz:

Cooh
/ Position Chrome, H.M.S.U., BG /

acidtrip
/ H.M.S.U., BG /

Targy
/ H.M.S.U., BG /

EXo
/ H.M.S.U., Mirizma, BG /

Ogonek
/ H.M.S.U., Metafiziq BG /

Mocks
/ H.M.S.U., T-Free, BG /

Konspirator
/ H.M.S.U., BG /

Balkansky
/ Subtrakt, Kuker, BG /

Thought
/ Freak, BG /

R.O.B.T.F.
/ BG /

Digital Soul
/ Wayside, Metafiziq, K.iD.S., BG /

Kigami
/ Metafiziq, K.iD.S., BG /

Apo & Nevena
/ XPRSN, BG /

Gomez b2b Fiks
/ Bassline-bg.org, Chronic Vibez, BG /

Sidereal
/ BG /

Subzter
/ BG /

Scop
/ BG /


Ticket Sale starts 24.May.2009 at the following locations:

# 4:20 Shop (61 Pirotska str., Sofia)

# Corporide ( 53 Han Asparuh, Sofia)

# Vision ( 55 Maria Luiza, Sofia)

# Dukan Meloman (7A 6th September str., Sofia)

# BreakPoint (72 Gurko str, Sofia)

# BreakPoint ( Mall “The Boulevard” – 1A Mladost, Sofia)


Tickets – 20 lv. // 10 euro – till 07.June.2009

Tickets – 25 lv. // 13 euro – from 08.June.2009

At the entrance – 30 lv. // 15 Euro

Second Day Price – 25 lv. // 13 Euro

ticket sale ends 3.July.2009

До Кътина може да се стигне от София с  градски транспорт , по следните начини:

с маршрутка 18
чиято друга крайна спирка е ж.к. Дружба.

с градски автобус 27
начална автостанцията в кв. Илиянци
(До нея се стига с трамвай № 11 и № 12)

VN:F [1.8.4_1055]
Rating: 9.5/10 (2 votes cast)
VN:F [1.8.4_1055]
Rating: +2 (from 2 votes)
2009
05.21

Konspirator
/ H.M.S.U. :: Bulgaria /

Mocks
/ H.M.S.U. :: Bulgaria /

EXCLUSIVE 6H selection of finest DnB around!

01.06.2009


entrance:
FREE aka. БЕЗПЛАТНО

place:
Stroeja

start:
21:00h

end:
03:00h

VN:F [1.8.4_1055]
Rating: 9.0/10 (2 votes cast)
VN:F [1.8.4_1055]
Rating: +1 (from 1 vote)