2010年10月9日星期六

Howto use G_F_W list in Proxy Switchy

There is a very useful addon for firefox called Autoproxy for bypassing G_F_W. It can use an online rule list to automatically enable proxy for blocked sites while disable proxy for speed for unblocked sites, which is quite handy. Unfortunately, there isn't a port for google chrome. As chrome in certain aspects has some advantages over firefox, and I occationally use it, it would be very nice to have something for chrome equivalent to Autoproxy for firefox.

Fortunately, chrome also has an extension called Proxy Switchy. Better, Switchy can use Autoproxy's rule list, which means it can also automatically enable proxy for blocked sites.

However, Switchy doesn't support window managers apart from Gnome/KDE. To workaround this, one must start chrome with the following environment variable set:

GNOME_DESKTOP_SESSION_ID=Default google-chrome

The URL of the rule list is : http://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt

Have fun!


2010年3月16日星期二

OMG, 我又回到了我的博客!

感谢西厢计划,终于又可以使用我的 Blogspot 博客了!



咋快乐来得快,去得也快呢,这才用了几天,就不行了!

2009年3月6日星期五

Debian Unstable 中 xscreensaver-demo 启动速度慢的问题

Debian unstable 中,启动 xscreenaver-demo 程序过程中间有一段时间窗口会失去响应,大概有 3 秒左右,让人很是苦恼。

首先想到的方法是用 strace 跟踪,找找看是哪个系统调用引起的。经 strace 发现是在启动一个子进程(fork)之后等待子进程结束。最开始想通过分析源代码找到问题出现的位置,找了一会儿之后发现其实想从源代码中找到具体位置还是挺困难的。

经过一段时间的摸索之后,突然来了一个灵感,通过 ps 查看等待过程之中和之后的进程列表。一试,果然有效!发现 xscreensaver-demo 是在等待 dcop 这个进程的返回。看来问题肯定跟这个 dcop 有关!手工启动 dcop,发现 dcop 在等待某些响应,一直没有等到,然后超时了。由于 xscreensaver-demo 是同步调用的 dcop,所以就导致了 xscreensaver-demo 失去响应。dcop 在等待什么呢,很有可能是在等待 kde 的基础组件中的某个程序的响应。由于我一般都不用 KDE,所以也不启动 kdeinit 程序,这应该就是最终的原因了。

找到原因之后,在系统启动脚本中加入了 kdeinit 的调用,xscreensaver-demo 再也不假死了。

2009年2月21日星期六

需要下载的 HPCA 2009 论文

Papers and Slides:
-------------------------
Characterization of Direct Cache Access on Multi-core Systems and 10GbE

Criticality-Based Optimizations for Efficient Load Processing

需要下载的 PPoPP 2009 论文

Papers and Slides:
----------------------------
Effective Performance Measurement and Analysis of Multithreaded Applications
Compiler-Assisted Dynamic Scheduling for Effective Parallelization of Loop Nests on Multicore Processors

Idempotent Work Stealing
Backtracking-based Load Balancing



Keynotes:
-------------------
Parallel Thinking
Multi-core Demands Multi-Interfaces链接Industrial Perspectives Panel
How to Build Programmable Multi-Core Chips

2008年11月6日星期四

如何进行交叉编译?

首先澄清一下交叉编译过程中所涉及到的几个基本概念,然后就具体的交叉编译步骤略作讨论。

什么是交叉编译?

基本的交叉编译方法

使用 GNU Autotools 进行交叉编译

交叉编译过程中涉及到的三个平台
1) build system;
2) host system;
3) target system;

2008年10月26日星期日

蓝牙 SDP 协议简介

基本概念
- Server
- Service
- Client

重要数据结构:
- Service Record
Service record 用于记录 SDP server 中关于一个服务的所有信息。这个 Service record 由一系列的 Service attributes 组成。SDP server 使用 Service record handle 来唯一的标识一个 Service,注意它是 specific to SDP server 的。然而 0x00000000 这个 Service record handle 比较特殊,它在所有的 SDP server 中都表示 SDP server 自身这个服务。

- Service Class
一个 Service class 定义了同一类服务类型,指定了这些服务必须包含什么属性,每个属性的 ID 是什么,Value 是什么意义的。Service class 可以继承,派生 class 的属性规格必须和基类相同。Service record 的所有属性是按照 Attribute ID + Attribute value 的形式组织的,每个 Attribute ID 标识什么属性是由该 Record 所属的 Service class 指定的。

搜索 SDP 服务的过程。
SDP 协议规定了 SDP client 只能够通过指定属性值来搜索服务,搜索到的是具有指定属性值所有 Service record。用于搜索的 Service attributes 必须是 UUID 形式的。搜索的时候,Client 给出一个它感兴趣的 UUID 列表,如果这个列表中的所有 UUID 都包含在某个 Service record 的 UUID 集合中,则该 Service record 匹配此搜索。

为了支持对 SDP server 中注册的服务进行浏览,所有的 Service class 都包含了一个公共的属性,即 BrowseGroupList,标识一个 Service record 的浏览域。这样 Client 就可以指定一个 BrowseGroup 类别来浏览该类别的所有服务记录。