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

Kee Club + Pi

當你咳到就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 passed store 's name and puts the result in it directly,without needing you to make it an array and use store[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係我既工作,我應該行入Chanel買2.55唔使睇價錢。

如果我將咁多年對男人既專注、耐性、毅力同誠意用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,