Showing posts with label szlug. Show all posts
Showing posts with label szlug. Show all posts

Monday, August 06, 2012


Got an eSATA / USB3.0 Dual Bay HDD Dock:
  1. http://www.vantecusa.com/en/product/view_detail/494
  2. http://www.amazon.com/gp/product/B007XJIYRC/
The first impression is incredibly both bay cannot work at same time, then I found it's actually because of CONFIG_SCSI_MULTI_LUN not default enabled: under USB mode, the dock is assuming having 2 luns, SCSI-3 standard has REPORT_LUN command but seems this device doesn't responds REPORT_LUN query, so it assumes only 1 lun, found 1 drive only; we can do a manual scan:

echo '- - 1' >/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/host12/scsi_host/host12/scan

After that the kernel scsi_mod middle layer would scan lun 1, found the 2nd drive; or could learn from Linux USB Frequently Asked Questions: or add scsi_mod.max_luns=2 to kernel boot parameter

(http://www.linux-usb.org/), "options scsi_mod max_luns=2" (updated to latest linux kernel v3.5)
$ dmesg
[15011.760697] usb-storage 2-1.1:1.0: usb_probe_interface
[15011.760709] usb-storage 2-1.1:1.0: usb_probe_interface - got id
[15011.760806] scsi12 : usb-storage 2-1.1:1.0
[15012.762244] scsi 12:0:0:0: Direct-Access     ST910006 40NS             CC01 PQ: 0 ANSI: 5
[15012.762847] sd 12:0:0:0: Attached scsi generic sg2 type 0
[15012.763368] sd 12:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
[15012.763787] scsi 12:0:0:1: Direct-Access     WDC WD16 00AAJS-00YZCA0   01.0 PQ: 0 ANSI: 5
[15012.764013] sd 12:0:0:1: Attached scsi generic sg3 type 0
[15012.764584] sd 12:0:0:0: [sdb] Write Protect is off
[15012.764587] sd 12:0:0:0: [sdb] Mode Sense: 23 00 00 00
[15012.765111] sd 12:0:0:1: [sdc] 312581808 512-byte logical blocks: (160 GB/149 GiB)
[15012.765865] sd 12:0:0:0: [sdb] No Caching mode page present
[15012.765871] sd 12:0:0:0: [sdb] Assuming drive cache: write through
[15012.766619] sd 12:0:0:1: [sdc] Write Protect is off
[15012.766625] sd 12:0:0:1: [sdc] Mode Sense: 23 00 00 00
[15012.767612] sd 12:0:0:1: [sdc] No Caching mode page present
[15012.767618] sd 12:0:0:1: [sdc] Assuming drive cache: write through
[15012.769723] sd 12:0:0:0: [sdb] No Caching mode page present
[15012.769726] sd 12:0:0:0: [sdb] Assuming drive cache: write through
[15017.751786] sd 12:0:0:1: [sdc] No Caching mode page present
[15017.751795] sd 12:0:0:1: [sdc] Assuming drive cache: write through
[15022.187904]  sdc: sdc1 sdc2 < sdc5 >
[15022.216575] sd 12:0:0:1: [sdc] No Caching mode page present
[15022.216580] sd 12:0:0:1: [sdc] Assuming drive cache: write through
[15022.216584] sd 12:0:0:1: [sdc] Attached SCSI disk
[15022.222847]  sdb: sdb1 sdb2 sdb4 sdb5
[15022.227795] sd 12:0:0:0: [sdb] No Caching mode page present
[15022.227800] sd 12:0:0:0: [sdb] Assuming drive cache: write through
[15022.227802] sd 12:0:0:0: [sdb] Attached SCSI disk
Well recognized:
$ lsscsi -gv
[12:0:0:0]   disk    ST910006 40NS             CC01  /dev/sdb   /dev/sg2
[/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/host12/target12:0:0/12:0:0:0]
[12:0:0:1]   disk    WDC WD16 00AAJS-00YZCA0   01.0  /dev/sdc   /dev/sg3 
[/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/host12/target12:0:0/12:0:0:1]
When attached to USB 2.0 ports, it archives 30MB/s sequential read/write performance, not as optimal as eSATA 100MB/s; This USB is actually "Mass Storage" / "SCSI" / "Bulk-Only" should be able to use uas (USB Attached SCSI) protocol, but not sure why uas drive not attached, a forced bind neither work

$ lsusb -d 174c:55aa -v
Bus 002 Device 003: ID 174c:55aa ASMedia Technology Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x174c ASMedia Technology Inc.
  idProduct          0x55aa 

[...]
  Configuration Descriptor:
    Interface Descriptor:

      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
# echo 2-1.1:1.0 > /sys/bus/usb/drivers/usb-storage/unbind
# echo 2-1.1:1.0 > /sys/bus/usb/drivers/uas/bind
write error: No such device
need another time to figure out why.

Monday, August 29, 2011

http://www.linuxpicnic.org/twiki/bin/view/Picnix20/

Picn*x 20 - The Linux 20th Anniversary Picnic 简单回顾

硅谷地区一年一度的 Linux 周年纪念日野餐活动照例在 Sunnyvale Baylands Park.举办,上周六8月27日上午11点到下午4点;这个活动自2001年的Linux十周年纪念开始到现在已经是第十个年头了;地点所在公园其实是沿着 SF Bay 从 Palo Alto, Mountain View, Sunnyvale, Santa Clara, 到 Milpitas 很长的海湾公园的其中一段,刚好这一段在 Sunnyvale 而已;公园的网站上有写明禁止宠物入内,主要是保护海湾公园的珍稀动植物,号召 Commute 拼车或乘公交前往,我就乘坐VTA轨道线到Crossman车站并下车步行了二十分钟到达;


这里是VTA轨道线Crossman车站、硅谷一带到处都是知名公司、这里背后是NetApp

路过NetApp的超小型四座送货车

到达了会场,远观真是声势浩大,有上百人吧
登记后每人贴上贴纸姓名便于聊天时互相可以知道姓名;近观看到很多都是Family一同前来的,甚至还带着刚出生的Baby就放在桌子上玩

Fedora组的OLPC、上面是Fedora15的Sugar界面;和手摇发电机、背后还有一块是太阳能电池板,能在野外有日光的情况下给电脑充电

Ubuntu组的情况在哪里都是人最多的、不过这次我都没有时间去近观

左边是家长带着他的小孩前来学习OLPC;
背后的白帽大叔是SFLUG的活跃成员,他们城区的活动比较多;
我在里面问到什么时候会用上 Wayland Default; 以及 Multi Pointer 特性有没有;
好像人们普遍误区把 Multi Pointer 理解成 Multi Mouse 支持了,我仔细解释了一下现有的 Linux 桌面上插多个 Mouse 还是只能控制同一个 Cursor; 而真正的 Multi Pointer 是指屏幕上会出现多个 Cursor, 每个 Mouse 分别控制一个;虽然这个概念很早就有了,在Xorg上也有人在实做,但我不知道进行到什么进度了
会场有人也是第一次听到这个吓了一跳,这能干什么呀?为什么需要多个 Cursor ?
我举例说多人在用多个鼠标在同一个电脑上玩游戏,应该是 More fun

和白帽大叔聊了比较多、他说到十天后他会再次起程前往 非洲 Tanzania 内罗毕 进行下一期三个月的Volunteering
我说 Vim Author 有一段提到 Uganda 的情况,确实需要很多的志愿者

(在vim里面可以 :help iccf)

还有最近看过的2007年电影 Hotel Rwanda, 描述1994年的 Rwanda Genocide
大叔说他一直在 freenode #vim channel 里面,回答了人们关于Uganda的很多问题
佩服!

对了,硅谷的人一般都叫城区就是SF,才算City, 只有City里面才有点像样的高楼; 而硅谷这边MV, Sunnyvale,  ... 什么的都是一排排小平房、最多就两三层,公司楼说好听也叫做写字楼,但其实都叫厂房

这个其实说的是 Twiki 的 web app,  与LEGO好像没有看到

SVWUX 组部署完成的室外 Wifi  Repeater;  作为Wifi热点提供给大家Wifi上网
这里的Wifi流量是通过这个 Repeater 转发到周围山上的多个Wifi接收机再到 Internet 的
我在现场用Android试过了此Wifi发送图片Twitter速度不错!
现场还有另外的人使用自己的3G数据卡将自己的Linux笔记本设置成Router,再通过无线路由器给大家提供冗余的Wifi 热点,很不错
现场得益于公园良好的环境、设施,电源、水源、烧烤场都是免费使用,有洗手间,作为固定设施的很多桌子底下都是电源插座

-

生态环境真不错,还长出了大蘑菇、想起了老家的群山哪

- -
玩 Amateur Radio 业余无线电的一组人、或者又叫做 HAM 火腿族

美少女、和父亲一块儿来都是 RedHat Volunteer (T-shirt) ;  健谈,谈到其父亲德国裔、母亲来自南美Columbia;  乐于分享自己的暑期项目住在 Costa Rica / Panama 火山 Hotel 的情形,期盼着 Christmas 假期可以去(另一个南美国度) 第一次见到 Grandmother、团聚;父亲向大家介绍她13岁、人多的时候还会 Camera Shy
其父亲会多国语言,甚至包括 Chinese Mandarin, 和我直接中文对话了一会儿


Friday, August 19, 2011

Step 2: boot livedvd-amd64-multilib-11.2.iso from hard disk (with grub2)

After a few days experience of the gentoo livedvd run from usb, I think the usb drive should be saved for some other important data; I decided to copy the iso and run it from hard disk; usually a hard disk has large enough space, people could just copy all files inside /image.squashfs to a local partition, like the way on gentoo-wiki, but this computer assigned to me has a SSD drive default, has only 120G, furthermore, it's already partitioned long time ago, I don't have more space to back up all data on it and don't want to risk re-partition it; so I'd still like the way of loop mount iso on the fly, for saving disk space;
http://www.gentoo-wiki.info/HOWTO_Lightning_fast_install_from_LiveCD

/dev/sda3       240277504   250068991     4895744   83  Linux
/dev/sda5       129341440   132855807     1757184   82  Linux swap / Solaris
/dev/sda6       132857856   152387583     9764864   83  Linux LABEL=UBUNTU
/dev/sda7       152389632   210980863    29295616   83  Linux LABEL=HOME
/dev/sda8       210982912   211372031      194560   83  Linux LABEL=DEBIAN

The ubuntu partition already has grub2 default installed and home partition has a lot of remaining space, so I mkdir /gentoo under /home, put livedvd-amd64-multilib-11.2.iso there, rename or hardlink a short name gentoo.iso there; extract kernel/initramfs from the iso and put into /boot of the ubuntu partition, create a new entry there and no need to install another grub;

Notice that grub2 (version 1.9*) has slightly different syntax with grub1 (version 0.9*):
  1. disk partition order, counter from 1, same as Linux partitions;
  2. better not to change (append entries) in grub.cfg directly, use /boot/grub/custom.cfg instead; because every time later ubuntu upgrade or install new kernels would call update-grub2 that would overwrite grub.cfg; you could change /etc/grub/40_custom (that support script smart calculation) or /boot/grub/custom.cfg on that ubuntu partition; here I use custom.cfg;
Gentoo-11 ~ # cat /mnt/sda6/boot/grub/custom.cfg
menuentry "Gentoo11-Live Linux-3.0.0 (on /dev/sda7 {gentoo/gentoo.iso})" {
	  linux (hd0,6)/boot/gentoo/gentoo aufs_mem=2G cdroot=/dev/sda7 cdroot_type=ext4 isoboot=gentoo/gentoo.iso vga=791 splash=silent,theme:livecd-10 console=tty1 quiet nodetect doload=ahci dox
	  initrd (hd0,7)/gentoo/gentoo-initramfs.gz
}

Compared to previous menuentry in syslinux.cfg, here I removed some unused parameters (like "root=/dev/ram0 init=/linuxrc" because that is the default, I think I should recommend the Gentoo-Ten team to remove that, but not sure if any other computer need it, at least my computer doesn't need it, it could boot, as granted; the only useful parameters here are:
  1. aufs_mem=2G, it means how large of tmpfs layered on top of squashfs by aufs; default it's 420M tmpfs, enough if you don't modify/install too many applications in live mode;
  2. cdroot=/dev/sda7, specify a parameter saves parsing during booting; specify cdroot_type the same way;
  3. isoboot=gentoo/gentoo.iso, you need to specify where do you save that iso inside that partition; it's required;
  4. nodetect doload=ahci dox; depends on if you know your hardware, if no idea, autodetect is best, but I know my hardware, specifying it could save booting time;
The default gentoo kernel/initramfs should work this way I thought originally, but it doesn't, I have to look at the init script and change it a little, here is the diff: http://paste.pocoo.org/show/460334/

the initramfs is just cpio (newc format) + gz; extract and reconstruct in this way;
$ mkdir -vp gentoo-initramfs
$ zcat gentoo.igz |(cd gentoo-initramfs; cpio -d -i)
$ emacs -nw gentoo-initramfs/...; modify /init and /etc/init.scripts
$ (cd gentoo-initramfs/; find |cpio -H newc -o) |gzip -v9 >gentoo-initramfs.gz
Or
$ (cd gentoo-initramfs/; find |cpio -H newc -o) |xz -v9 >gentoo-initramfs.xz
Gentoo-11 ~ # (cd /home/gentoo/; ls -lh gentoo-initramfs.*)
-rw-r--r-- 1 root root 9.8M Aug 16 02:25 gentoo-initramfs.gz
-rw-r--r-- 1 root root 7.5M Aug 15 17:50 gentoo-initramfs.xz
The latest xz (aka. lzma2) could save 20% over "gzip -v9";

Update: use "xz --check=crc32" instead, because some latest xz support "none,crc32,crc64,sha256" or more types of integrity check, default as crc64; the kernel xz dec is "xz embedded" that only support "none or crc32",  kernel may report XZ_OPTIONS_ERROR, you could use "xz -vl ..." to check it, read Documentation/xz.txt for more;
/usr/src/linux-3.0-gentoo-r1/lib/decompress_unxz.c:
-=--:%%--F1  decompress_unxz.c   92% L364   (C/l Abbrev)

        case XZ_OPTIONS_ERROR:
                error("Input was encoded with settings that are not "
                                "supported by this XZ decoder");
                break;

# (cd gentoo-initramfs/; find |cpio -H newc -o) |xz --check=crc32 -v9 >../gentoo-initramfs.xz

Thursday, August 18, 2011

Step 1: boot livedvd-amd64-multilib-11.2.iso from a usbstick (without wiping all data)
Gentoo Linux releases 11.2 LiveDVD: run the iso from hard disk (hack on initramfs)

Recently Gentoo LiveDVD 11.2 was released on Aug 7, I'd like to try it but don't want to waste a blank DVD; the first thing I think is to run it on a usb; the only usb stick I have important data, don't want to try the dd way ("dd if=image.iso of=/dev/sdb")  in faq which will wipe out all data, looking up some documentation on its default isolinux/syslinux, finally I got this way working:

1) mount loop that livedvd-amd64-multilib-11.2.iso; mkdir /gentoo on the usb stick, copy all files inside the iso into that /gentoo;
2) rename its isolinux/ to syslinux/, and isolinux.cfg to syslinux.cfg; yes! thanks to syslinux.zytor.com great work, they're sharing the same configuration file syntax, what you need to do is just rename;
3) since we copied all the files from rootdir of cdrom to /gentoo of another disk(usb), the syslinux.cfg need to be adjusted; find out the "label gentoo-x86_64", change it to this;


label gentoo-x86_64
  MENU LABEL Gentoo ^x86_64
  kernel ../boot/gentoo
  append root=/dev/ram0 init=/linuxrc dokeymap aufs looptype=squashfs loop=/gentoo/image.squashfs cdroot initrd=../boot/gentoo.igz vga=791 splash=silent,theme:livecd-10 console=tty1 quiet subdir=gentoo

the "kernel" "initrd=" parameters was parsed by syslinux so it support "../" style relative path, so you could move the whole "/gentoo" to any name, under any path; but the "loop=" and some otherwhere was read by code inside the initramfs (here it's ../boot/gentoo.igz), there some hard code doesn't support relative path, so you must write its full absolute path, prepend "/gentoo" to image.squashfs, and append "subdir=gentoo";

for other label entries if you want to use, you could change the same way;

4) install syslinux bootsector to that usb stick (/dev/sdb has only one vfat partition):
  syslinux -d /gentoo/syslinux /dev/sdb1

Then you could boot it with this usb: find out label gentoo-x86_64 and boot it into LiveDVD 11.2;
The 2.8G iso file has packaged with linux kernel 3.0.0 and most a dozen of major and minor WM Environment (gnome3/kde4/xfce/lxde/windowmaker/openbox/fluxbox/awesome/xmbc/...), and all applications on each WM; just try and found which is your favorite? all the latest software;


http://www.gentoo.org/news/20110807-livedvd.xml
http://syslinux.zytor.com/wiki/index.php/SYSLINUX
http://paste.pocoo.org/show/460334/
http://www.gentoo.org/proj/en/pr/releases/10.0/faq.xml
http://mirrors.kernel.org/gentoo/releases/amd64/11.2/

livedvd-amd64-multilib-11.2.iso                      06-Aug-2011 07:12  2.8G

Saturday, April 23, 2011

grub2 default menu entry

Under Debian or Ubuntu: edit /etc/default/grub, add or uncomment these two lines


GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

And, run update-grub again;

If you want more customized menu entries, you could add them under /etc/grub.d/40_custom, you also need to run update-grub manually; this file would get updated into /boot/grub/grub.cfg automatically in future when you got kernel updates;

Or you could use /boot/grub/custom.cfg directly (if not exist, create it); in this file you don't need to run update-grub; (if you want to know why, read /etc/grub.d/41_custom)

Monday, January 24, 2011

献血。经历了国内2010年下半年持续至今的血荒、相关原因就不说了,国内很多人都已经分析了原因,制度是最大的原因,我家2009年有病人在黄石医院就亲有体会、拿了献血证想去兑现免费等量用血是何其难,最后还是直接交钱,拿钱最快了。并且身边朋友有一个反例是自90年代在深圳打工期间献血后身体素质下降,这也许是当年卫生条件不够造成的感染呢,无法考证。

2010年在新加坡,亲身经历过新加坡的号召献血,不过新加坡的华文称为"捐血",用词不一样,但英文都是 Donate Blood, 但那次因为有事务太多没有去现场,但这个过程了解到他们是真正的义务献血,没有献血证,完全凭自愿,当然献血后的点心补充营养是不会少的。网上搜索到的一篇出自黄冈中心血站的 "新加坡捐血见闻http://www.hbhgxz.cn/News_View.asp?NewsID=236 与我当时在那边本地报纸描写的差不多;

这次2011来到美国,刚开始上班两三周不多久,收到HR发的献血通知,这次是Stanford大学血液中心,斯坦福大学呢,采血卫生条件这样的基本问题应该是没得说,何况这次是安排移动献血车到公司门口停驻, BloodMobile, 一定要去一次。中午早早地吃过饭去,12点半准时到达,看到各位大叔大姐,献血之后在享受美味点心哪。我来到后面开始排队填表,等到我了,我觉得还是有点紧张、说我自己有点偏瘦,第一次献血能不能少点? "Can I donate less than normal?" 负责填表检查的大叔也看出我的紧张了,说没问题,又问我来美国多久了,我说刚满一个月,呵呵,大家都在善意地笑,大叔很严肃地继续问我来自哪里,我说 "China citizen, but coming from Singapore", 他说 Singapore 没问题,但是 China, 最后一次离开是什么时间,我如实回答后大叔说抱歉现在你还不能献血。最后有一位阿姨出来详细地解释 China 有一种(奇怪的)血液病,这个单词太专业了我没太听懂,说这种血液病在短期内无法检测出来,只能请我等离开China满三年后才能献血,也就是2012年。最后只能表示遗憾,友好地合影。




http://bloodcenter.stanford.edu/ 这就是斯坦福大学采血中心的移动献血车、今天来到公司门口

Tuesday, August 17, 2010

编译无需initrd能自启动之Linux内核:要点

使用 initrd (or initramfs) 固然有很多优点,但无可置疑地拖慢了启动速度,这方面编译内核的文档虽多,但我发现还是有不少人因曾经编译失败不能启动的体验而被吓住了,或者因保守起见编译了太多本机不需要的驱动程序,这样拖慢了编译内核的速度 (而且不管是模块形式还是内核形式,都是要么浪费了硬盘空间、要么就浪费了内存);
这方面记录几个要点,保证所生成的内核一定能够自启动。如果还不能启动请联系我。

1. 硬盘驱动程序 (或曰主板驱动?)
怎样找到正确的硬盘驱动程序?有人的经验谈是确保选中 ahci, 其实这只是一种流行的选择,当然不能代表所有。发现正确驱动程序的方法是顺着 sysfs 找,这里面提供了非常丰富的信息:
    $ ls -lU /sys/block/sda
lrwxrwxrwx 1 root root 0 2010-08-17 21:03 /sys/block/sda -> ../devices/pci0000:00/0000:00:14.1/host4/target4:0:0/4:0:0:0/block/sda
发现了它在 /devices 下的真正节点是 "/devices/pci0000:00/0000:00:14.1" (而不在 host4 下,想想), 这时再一次访问
    $ ls -lU /sys/devices/pci0000:00/0000:00:14.1
其下 driver -> ../../../bus/pci/drivers/pata_atiixp 因此,此机器上正确的驱动程序是 pata_atiixp,
  找到了正确的驱动程序之后还有一个任务是在 menuconfig 阶段如何找到其对应哪一个菜单项?这个需要在源代码中搜索:
    $ find drivers/ -name Makefile |xargs grep -nw pata_atiixp
drivers/ata/Makefile:28:obj-$(CONFIG_PATA_ATIIXP)    += pata_atiixp.o
  不知道在内核哪个子目录的话就在根目录 find, 一般来说大概知道是在 drivers/ 子目录,省点时间, 搜索所有 Makefile 将结果传给 xargs grep -nw 搜索单词 pata_atiixp, 得到唯一的一个结果 是 CONFIG_PATA_ATIIXP, 这个也许你猜到了结果其实就是小写变大写,但实际中有很多驱动的模块名称与 CONFIG 配置项名称是不一样的。所以 find 搜索能保证一定能找到了 menuconfig 配置项;
  最后一步就是在 menuconfig 过程中,使用 "/" 键,调出搜索界面,输入 PATA_ATIIXP 搜索之,一般来说,就找到了准确的 pata_atiixp 驱动所在菜单项的位置。把它设置为内联编译 (inlined compiling)就可以了。
以当前硬件流行驱动一般都是SATA或者PATA,都在 Device Drivers \ SerialATA and Parallel ATA 目录,而且一般来说一个机器只需要一个此类驱动就足够了 (同时使用两种SATA硬件的还没见过),因此选上 pata_atiixp 之后, 其它选项皆禁用之。
2. 根文件系统
  大概调查一下 (df -Th), 判断一下 根文件系统的类型,是 ext4 还是 btrfs, 与上同理,也把它设置为内联编译。为了常用U盘可以加上FAT支持,其它文件系统皆禁用之。
(注意不要选内核NTFS, 真正要读写NTFS分区可以使用 ntfs-3g 项目全用户层 code 解决)

有了这两点根本上就足够自启动了,以此为出发也可以继续把网卡驱动找出来,
3. 从 /sys/class/net/... 出发,找到 eth0 的真正驱动程序,在源代码搜索 Makefile 找到配置项名称,在 menuconfig 找到菜单项,设为内联编译;其它无关网卡驱动皆清除之。

(最后,清除了若干驱动并且保证了可以自启动的内核,在当前双核系统上一般五分钟编译出来。)

Thursday, July 22, 2010

见到了 Dawn Song 和 周杰伦

http://www.tektalk.org/2008/04/21/海外学人–宋晓东(dawn-song)/
  1. crquan 于 2010-07-21 4:52 pm
    今天到新加坡国大NUS算是亲眼见识了 Dawn Song 之 aggressive, 语速、以及思维转换之快皆非常人所能及也,在1个小时的Seminar里讲了三个普通Seminar的内容,其在UCBerkeley的最新研究是 webblaze, 在Web安全领域的最新Symbolic应用;并且相关 paper 又是其一贯的对security领域四大TOP1会议(IEEE S&P, Usenix security, ACM CCS, NDSS)皆灌水之
    http://webblaze.cs.berkeley.edu/

晚餐在 Bugis 才吃过, 得闻前方有一新加坡闻名小吃街,步行至与 Beach Road 有一条 Link 小径,两旁都是古式三层复式楼;只闻海南鸡饭、以及麻辣飘香、港汇茶点,食客都热情到自己帮忙把店家的桌子往外搬到行人街道,尚有余而不得座者;行间忽见不远处 Bugis 广场有排队长龙, 怕是又有什么大人物吧!走近看,竟然才知是周杰伦,排队者每人皆持两本唱片,黑皮不见其名,排队者约有上千人,等待上台亲笔签名;远处舞台之上有某人伏笔挥持;颇有神采;待良久,竟不能得见全貌;

Sunday, July 04, 2010

Latest Tweet: http://www.nudt.edu.cn/summerschool/chn/recruitinfo.html 今闻母校国防科大开设“天河计划”研究生国际暑期班(7月19日至8月6日),招生正式七十人、旁听四十人、由国际知名教授、全英文授课、云计算及无线前沿技术、费用全免、西部地区学校正式学员报销往返硬座火车票。报名截止7月10日。

1.课程教学:(每门课程为1个学分)
    1).云计算和虚拟化技术(Prof. Kai Hwang)
    2).无线和移动网络(Prof. WEI WAYNE LI)
    3).高级软件工程(Prof. Haibin Zhu )


找到了三位教授的背景分别是:

    1). Prof. Kai Hwang
毕业于1972年、加州大学伯克利分校博士、现任南加州大学教授、主研并行计算方向
Ph.D. in Electrical Engineering and Computer Science, 1972, UC, Berkeley, Berkeley, CA.  http://ee.usc.edu/faculty_staff/faculty_directory/hwang.htm

    2). Prof. WEI WAYNE LI
南德州大学计算机系教授,主研无线自适应网络方向;
http://engineering.tsu.edu/~wli/

    3).Prof. Haibin Zhu
加拿大尼普森大学计算机系教授,主研软件工程、人机交互;
http://www.nipissingu.ca/faculty/haibinz/

大学所需要的,正是这种不为名、不为利、的教学和科研精神;多一些踏实的研究、少一些银河麒麟般闹剧;希望母校夙愿“建设世界一流大学”有朝一日能够实现!

(同感于1help1@tektalk, 如能开放视频,做成类似于 MIT-Open-Web-Course, 就更精彩了!)
http://www.tektalk.org/2010/07/03/天河计划/

Tuesday, November 17, 2009

发现故事于近期 LinuxWeeklyNews 之 Quotes of the week (语录) 环节:
http://lwn.net/Articles/359270/

The fact is, maintainership does _not_ mean ownership. It means that
you should be _responsible_ for the code, and you get credit for it,
but if problems happen you do NOT "own" it. Not at all.
If you don't understand that, you shouldn't be a maintainer.
-- Linus Torvalds
事实是,维护不是意味着你拥有这部分代码;而是你要对它负责任,你从中获得荣誉和别人的称赞;而当问题发生时,你并不承担错误;完全不是;

可以进一步这封邮件的全文:
http://lwn.net/Articles/360156/

这封出自 Linus 的邮件第一句话就是 "You're full of sh*t." (你就是一坨屎) ...

如果你再有时间和兴趣,还可以进一步阅读讨论线索之全文,以了解整个事件之来龙去脉:
http://thread.gmane.org/gmane.linux.kernel/908831/focus=41872
邮件线索原始标题: "请考虑重置 commit 7d930bc" (即反转 commit 7d930bc 的所有修改)
1) Dmitry Torokhov 报告 2.6.32-rc5 中 cfg80211 (也就是 wireless 部分) 出现 Kernel Oops, 经过一番艰苦 git bisect 之后,发现引起问题的原因在于 commit 7d930bc, 重置这号 commit 之后可以解决;可见这确实是一个邪恶的 commit, 而且 git show 显示它引入于 2.6.32-rc5 之后;
2) David Miller (net-2.6 总管) 说在我的 net-2.6.git 树已修正了,稍晚会推送给 Linus;
3) 这时 Marcel Holtmann 忽然说了句 这个事件是这样解决了,但类似事件我们是不是可以改进下工作流,更多考虑下 最直接那个 MAINTAINER 的看法? (Wireless 的 cfg80211 和 nl80211 接口部分维护人是 Johannes Berg) 让他能有个说句话的机会,而不是直接跳过去了?
4) Johannes Berg 说话了,"唉,类似问题困扰已久" 指的是工作流上,当问题发生时,人们都直接找 Linus 或其它几位顶级 MAINTAINER 要求重置了那个出问题的 commit, 甚至也不通知一下 那个 commit 的原始作者和我们这些底层的 MAINTAINER, 导致我们反而后知后觉,后面 merging 过程中麻烦多多;所以能不能先发给我们,以标题类似于 "发现问题于 某 commit, 我们看怎么解决?"
5) Dmitry Torokhov: 我不明白问题出在哪里,我都已经抄送给 wireless 邮件列表了,我觉得在 -rc5 之后我们要迅速地解决问题
6) Johannes Berg: 我不反对要迅速解决问题,你当然可以直接发给Linus要求直接revert,我只是说能不能先发给MAINTAINER(也就是我了),我们有了更好的办法再汇报给Linus不晚哪,因为有时候 仅仅一个 revert 是不够的,因为原来那个 commit 肯定也是解决了某事情,如果我们直接 revert 可能会导致更糟糕的事情;这种工作流显得更为友好;而不是只被列在Cc里面,好像MAINTAINER的意见只是第二位的;
7) Dmitry Torokhov: 是说 To: 和Cc: 差别待遇吗?好了好了,下次我把你们全列在 To: 里面好吧
8) Marcel Holtmann: 近期我也发现有这种趋势:人们就不管三七二十一,上来就要示 revert, 然后才考虑解决真正的解决问题;
9) Linus 发火了: "你就是一坨屎" BUG 终究是BUG 就要被 revert 掉;那些在 merge window (rc2) 之后还引入 BUG 的人们应该被钉在耻辱柱上;一个 commit 引入的问题比它修正的要多,你说我们是不是就该要 revert 它?
10) Andrew Morton: subsystem maintainers 通常都很不靠谱
11) David Miller: To Andrew: 这很 平常 (common), 但不是普遍的 (universal)
12) Andrew Morton: David, 顺便把这几个 patch 从 -mm 树给接过去?
13) David Miller: 没问题,已应用至 net-2.6 树;其中有个 isdn-eicon-return-on-error.patch 又在用自动格式化工具玩大便 (holy crap someone run that driver through some auto-formatting tool!)
14) Linus Torvalds: 坦率地说,我还是对这个bug是非常的不满意:1) 它是 -rc5 之后引入的 2) 它被多人 bisect 出来,这浪费了多少人的时间? 3) 此 commit 的原始作者(Johannes Berg) 在被告知了 具体哪一个 commit 导致的问题却还想从报告者那里等待更多的信息(你都已经被通知这号commit有问题了,你就不能自己搞定吗?);
15) Marcel Holtmann: 当然是需要修正,但盲目地 revert 可能导致其它副作用; And to be honest, Johannes Berg 在解决 wireless 问题上还是很积极的;
16) Linus Torvalds: 每个人都知道出一问题要修正它;但真正的问题是"我们要最快地修正它" revert 就是最快的办法 我等不及 subsystem maintainer 来修正它;(To Marcel)你别光说讨好的漂亮话了;你错了,你应该感谢 Dmitry ,请求原谅浪费了他的时间;
17) Marcel Holtmann: 其实四天前我的邮箱就有了 Johannes 发过来的 解决办法的 patch 了,你的意思是要我当时就 越过 MAINTAINER (Johannes and David Miller) 直接把它发送给你?
18) Linus Torvalds: 你要我们的用户再多等一天还是再多等五天? 在 -rc5 之后出现的问题我们要在最快的时间把它修正,即使不是最优的结果,但我们的测试用户有多少时间给我们浪费的? 我们要做的就是 "Deal with it", And yes, 有时候 "Dealing with it" 就意味着必要时绕过维护者。 最差的情况下 我们有这样一个严格的管道在必要时 让用户不必在 MAINTAINER 路上等待太多时间
19) Marcel Holtmann: 我也同意。但是公平说,这个 bug 并不是影响着所有人 ...
20) Linus Torvalds: 不是的,你又错了。我是被动卷入这个线索的,其实看一眼那个 commit 就知道那个 memcpy 就有 NULL pointer dereference 问题。有人撞上了这个 problem 这就够了
21) Ingo Molnar 插入: 列举 Johannes 前两天的一封回复邮件,以说明其(Johannes)回复是 无用的, 不负责任的 (Unhelpful, defensive, in denial.) 你的 "hey, nothing happened, we fixed it after all" 表示你对此的无知,此类可避免的事故在将来还会重演
22) Marcel Holtmann: 谁这么说话了?那不是我说的好不好?
23) Ingo Molnar: 没在说你。是说上面写那个邮件的那个人,上面已 quote (就是 Johannes 写的) 部分
24) ... 有时候BUG比较复杂,1天还搞不定;这就证明了你是不够 responsive; 接着讨论要做到什么样才能叫做 responsive, 多少时间响应? ...
25) Linus Torvalds: 拜托,两天看起来是不多,但我们的 merge window 关闭已有5个星期了,我们马上就要发布 (2.6.32) 了

Linus 对 Kernel 还是相当严格,顺便也提到 Mailing list 这个 "Immediate but asynchronous" 交流方式的优点,

顺便 David Miller 提到有人还在玩 auto-formatting tool 提交补丁,这种在刚开始入门时尚可,入门久了,再玩就没什么意思了,还会引起人家反感,请看这里的二楼评论;
http://roclinux.cn/?p=1440

BTW, 近期发现 有人 做的 KernelPodcast 不错,以语音的方式为大家播报最近 Kernel 进展和人物事件, 可以同时 作为内核 学习 和 英语 学习材料:只是希望可以持久下去, 这样的工作除了 LWN 可以作为全职以外,一般人恐怕很难持续下去:
http://www.kernelpodcast.org/feed/