From owner-soc-status@FreeBSD.ORG Wed Sep 25 14:49:24 2013 Return-Path: Delivered-To: soc-status@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D448760A; Wed, 25 Sep 2013 14:49:24 +0000 (UTC) (envelope-from zxyu.core@gmail.com) Received: from mail-bk0-x236.google.com (mail-bk0-x236.google.com [IPv6:2a00:1450:4008:c01::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1FB512AE1; Wed, 25 Sep 2013 14:49:23 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id mz12so2334134bkb.13 for ; Wed, 25 Sep 2013 07:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=akm8SAFqOMKydxT9PpSdOnTsuSKteNKW/88eBj5TQ1E=; b=TSQasMXKgbBAxfNlfVRGQPUBan2liwIl7eRy7qCelP1BH05+wm6rX8XNMxPRpDstl2 iCdWZRz3fI5Iy+P2O7wASikqXs0lXGKCQwksegfuKj6SnUZVs02Sh5arxaMs2p7A4tIT azuhIEQiYlhaHNEofpz3puMMO/mem+CXWIFKnMCxbGDO7HFUelXsH5i7mYFw+LISbXWa 3OAJgeogvSRkQwN5zIGC9pc0HllI9xf7ZJznx18sclZaYqzmL1QayQSs8vzVcttF3XIR 9ZqWNhYlKQ3TwRhTmoFFLHTyPYiMFbbNFEW3V68VIScYzrZh5IFpawaV0WY+LBPWu6Os eNQg== MIME-Version: 1.0 X-Received: by 10.205.24.131 with SMTP id re3mr27975348bkb.8.1380120562343; Wed, 25 Sep 2013 07:49:22 -0700 (PDT) Received: by 10.204.238.138 with HTTP; Wed, 25 Sep 2013 07:49:22 -0700 (PDT) Date: Wed, 25 Sep 2013 22:49:22 +0800 Message-ID: Subject: Final Weekly report and the summary of my GSoC project From: zhixiang yu To: soc-status@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Alexander Motin , "grehan@freebsd.org" , Neel Natu X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 14:49:25 -0000 Hi all, During the last week, I spent time on stress testing, bug fixing, limitation removing and make bhyve cdrom emulation works under Linux. My stress test is running the following cmds at the same time: 1. cp src.txz from virioblk to ata device, then diff, exit if diff report error, delete src.txz. loop for ever 2. cp /usr from virioblk to ata device, then diff, exit if diff report error, delete. loop for ever 3. tar zxf src.txz to ata device, then delete. loop for ever 4. cp /boot from virioblk to ata device, then diff, exit if diff report error, delete. loop for ever 5. run "zpool scrub test0" and "zpool status" every 10min, check the output 6. use release.iso as the atapi backing file, mount, cat everything to /dev/null After 24 hours, everything seems fine. Here is the summary of my GSoC project. During this summer, I added AHCI device emulation to bhyve so that we can emulate normal cdroms and hard drives. The development is done under the guide from Alexander, Peter and Neel. During SoC application period, I carefully divided the project into small goals and give the timeline for each goal. Basically speaking, I almost follow the timeline I planed in my gsoc proposal. Before early July, I implemented one bare bone pci_ahci.c. Before midterm evaluation, I completed the emulation for almost all port registers and the most important three data structures of AHCI (command list, command table and PRDT). I also sent out my first accepted FreeBSD patch during that period ;) After midterm evaluation, necessary ata commands emulation and atapi commands emulation were finished. The biggest pleasure/achievements during this summer are: 1. write code under old-hand's guidance. My mentors from FreeBSD community are really amazing. They are really experts in their technology area. They can quickly find out the main problem in your code and find the best direction to your questions/problems. NOTE: they tell you what, why and one brief but clear and definite direction, it's your own responsibility to design and implement the solution. For example: Alexander clearly pointed out the backing file io should be done in another thread rather than block main emulation thread during initial design decision. Then Peter told me that he has implemented on common block_if, this makes my ahci emulation is the first real user of his blockif framework ;) And Alexander also suggested to handle single ATA command as multiple block I/Os if S/G list is longer then supported to remove one big limitation of my initial code. Peter and Neel quickly replied that I can follow existing instruction emulations to handle one instruction exception. This results in my first accepted FreeBSD's patch ;) 2. I can't be familiar with AHCI any more. Now, I can even clearly describe the main mechanism of AHCI in several minutes with one pencil. I guess I can quickly implement AHCI driver for various hobby OSs In the end, thank FreeBSD and Google to provide me such great coding opportunity. Thank Alexander, Peter and Neel for their great help and guidance. Best wishes to everyone!