Linux kernel asynchronous IO doesn't work on sockets
I've been considering writing a fully asynchronous ATA over Ethernettarget driver (I'm not entirely happy with the current one and itsperformance). If Linux asynchronous IO worked on sockets (specificallyraw network sockets), there is a nice simple design where you just setup a pool of buffers and then cycle each one through a little statemachine (network in to disk IO to network out).
(This works especially great for AOE because the protocol is both basedon raw packets and completely unordered,
Friday night
當你咳到就o黎肺都甩,
應該點?
啪多個shooter囉。
shooter唔會幫你止咳,
但係會俾你有5秒左右o既時間,
唔記得o左令你唔開心o既事。
You can't change a Python function's local variables from outside
In an aside in a recent entry , I wrote:
With sufficient cleverness, you can construct a version of
capture()that is passedstore's name and puts the result in it directly,without needing you to make it an array and usestore[0].
I'm wrong. In Python, no outside power can change a function's localvariables (more precisely, no outside power can change the namebindings , doing the equivalent of ' localvar =something '). While you can
An interesting mistake with ZFS and iSCSI
First I'll show you the symptoms, then I'll explain what I did to shootmyself in the foot:
# zpool create tank01 c0t38d0# zpool create tank02 c0t39d0# zpool replace tank01 c0t38d0 c0t42d0
(Time passes, the resilver finishes, and zpool status tank01 shows nouse of c0t38d0.)
# zpool attach
自言自語
如果我將咁多年對男人既專注、耐性、毅力同誠意用o係我既瘦身行動,我應該瘦到得棚骨。
我講真o架。
頂。
我有一個小願望
這個小願望會是我送給自己的27歲的生日禮物。
有人支持我,
有人大潑冷水,
有人願意投資,
有人說我該將這些錢拿來買錶保值,
有人不收分文幫助。
我想典當舊男友送我的首飾來讓願望成真,
但其實有點不
幼稚園的回憶
記得下課後等待媽媽接我回家,如果她有餘錢,會買一串紅腸帶來給我吃。
記得有次下課後班主任要我
Why I wish Python had assignment in conditionals
There's a lot of times where a function wants to return more than aplain boolean; for example, validation routines often want to returnsome sort of explanation of the validation error (if there is one).At the same time, the most natural way to use the function is oftenin the flow of a conditional:
if blah(o): ....elif not validates(o): # whoops, lost the error reason
There's a variety of traditional answers to this,