From owner-freebsd-arm@FreeBSD.ORG Sun Feb 28 04:31:54 2010 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D1231065670; Sun, 28 Feb 2010 04:31:54 +0000 (UTC) (envelope-from nork@ninth-nine.com) Received: from sakura.ninth-nine.com (unknown [IPv6:2001:2f0:104:80a1::25]) by mx1.freebsd.org (Postfix) with ESMTP id 189288FC1D; Sun, 28 Feb 2010 04:31:52 +0000 (UTC) Received: from nadesico.ninth-nine.com (ns1.ninth-nine.com [219.127.74.121] (may be forged)) (authenticated bits=0) by sakura.ninth-nine.com (8.14.4/8.14.3/NinthNine) with ESMTP id o1S4Vk1K076552; Sun, 28 Feb 2010 13:31:51 +0900 (JST) (envelope-from nork@ninth-nine.com) Date: Sun, 28 Feb 2010 13:31:45 +0900 From: Norikatsu Shigemura To: Alexander Motin Message-Id: <20100228133145.e0c8bc68.nork@ninth-nine.com> In-Reply-To: <20100226014718.c0a07c84.nork@FreeBSD.org> References: <20100218023945.848cd01a.nork@FreeBSD.org> <4B7EF63C.7030008@FreeBSD.org> <20100226014718.c0a07c84.nork@FreeBSD.org> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.5; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org, freebsd-current@FreeBSD.org, Shigemura , Norikatsu Subject: Re: ATA_CAM-ed mvsata(4) on OpenRD-client X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 04:31:54 -0000 Hi mav. I didn't know what's happen. So I'll report code trace and cam related struct dump with ddb which I made. The first, cam ddb patch: show cam show cam_eb show cam_et show cam_ed show cam_sim show cam_periph I saw gibbs'd document, and made it. If not enough, please tell me! (*) http://people.freebsd.org/~gibbs/ARTICLE-0001.html I got following results: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - : sata0: at mem 0xf1080000-0xf1085fff irq 21 on mbus0 sata0: [MPSAFE] sata0: [ITHREAD] ata0: on sata0 ata0: [MPSAFE] ata0: [ITHREAD] ata1: on sata0 ata1: [MPSAFE] ata1: [ITHREAD] pcib0: at mem 0xf1040000-0xf1041fff on mbus0 pcib0: PCI IO/Memory space exhausted device_attach: pcib0 attach returned 12 Timecounter "CPU Timer" frequency 200000000 Hz quality 1000 Timecounters tick every 10.000 msec lo0: bpf attached spin lock 0xc36c8d00 () held by 0xc361bb08 (tid -1061281488) too long panic: spin lock held too long KDB: enter: panic [ thread pid 0 tid 100000 ] Stopped at 0xc09e1d04 = kdb_enter+0x48: ldrb r15, [r15, r15, ror r15]! db> show cam Transport layer configuration information: cam_eb = 0xc36c88c0: path_id = 0, sim_name = ata cam_et = 0xc36c8880: target_id = 4294967295 cam_ed = 0xc376e000: lun_id = 4294967295 cam_eb = 0xc3770840: path_id = 1, sim_name = ata cam_et = 0xc3770800: target_id = 4294967295 cam_ed = 0xc376e800: lun_id = 4294967295 cam_eb = 0xc35df5c0: path_id = 4294967295, sim_name = xpt cam_et = 0xc35df540: target_id = 4294967295 cam_ed = 0xc356d800: lun_id = 4294967295 cam_periph = 0xc3574b80: unit_number = 0, periph_name = xpt - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [cam_eb = 0xc36c88c0] OK line - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - db> show cam_eb 0xc36c88c0 CAM Existing Bus information: et_entries = -> 0xc36c8880 (struct cam_et *) links = -> 0xc3770840 (struct cam_eb *) path_id = 0 sim = 0xc3604780 (struct cam_sim *) last_reset = 0.0[s] flags = 0x0 refcount = 4 generation = 1 parent_dev = 0 (device_t) xport = 0xc0bbfe80 (struct xpt_xport *) db> show cam_sim 0xc3604780 SIM(SCSI Interface Module) information: sim_action = 0xc0929c38 sim_poll = 0xc09294e8 sim_name = ata softc = 0xc35e5800 (void *) mtx = 0xc35e5974 (struct mtx *) sim_doneq = -> 0 (struct ccb_hdr *) links = -> 0 (struct cam_sim *) path_id = 0 unit_number = 0 bus_id = 0 max_tagged_dev_openings = 0 max_dev_openings = 1 flags = 0x2 callout = 0xc36047bc (struct callout) devq = 0xc3604800 (struct cam_devq) refcount = 2 ccb_freeq = -> 0 (struct ccb_hdr *) max_ccbs = 9 ccb_count = 0 db> show cam_et 0xc36c8880 CAM Existing Target information: ed_entries = -> 0xc376e000 (struct cam_ed *) links = -> 0 (struct cam_et *) bus = 0xc36c88c0 (struct cam_eb *) target_id = 4294967295 refcount = 3 generation = 1 last_reset = 0.0[s] db> show cam_ed 0xc376e000 CAM Existing Device information: links = -> 0 (struct cam_ed *) alloc_ccb_entry send_ccb_entry target = 0xc36c8880 (struct cam_et *) sim = 0xc3604780 (struct cam_sim *) lun_id = 4294967295 drvq ccbq asyncs periphs = -> 0 (struct cam_periph *) generation = 0 owner = 0 (struct cam_periph *) quirk = 0 (void *) maxtags = 1 mintags = 1 protocol protocol_version = 0 transport transport_version = 0 inq_data ident_data inq_flags = 0x0 queue_flags = 0x0 serial_num_len = 0 serial_num = 0 (u_int8_t *) flags = 0x1 tag_delay_count = 0 tag_saved_openings = 0 refcount = 2 callout = 0xc376e3d0 (struct callout) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [cam_eb = 0xc35df5c0] Freeze Line - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - db> show cam_eb 0xc35df5c0 CAM Existing Bus information: et_entries = -> 0xc35df540 (struct cam_et *) links = -> 0 (struct cam_eb *) path_id = 4294967295 sim = 0xc3574c00 (struct cam_sim *) last_reset = 0.0[s] flags = 0x0 refcount = 3 generation = 3 parent_dev = 0 (device_t) xport = 0xc0bbfc6c (struct xpt_xport *) db> show cam_sim 0xc3574c00 SIM(SCSI Interface Module) information: sim_action = 0xc0906df8 sim_poll = 0xc0904018 sim_name = xpt softc = 0xc3574b80 (void *) mtx = 0xc0be5204 (struct mtx *) sim_doneq = -> 0 (struct ccb_hdr *) links = -> 0 (struct cam_sim *) path_id = 4294967295 unit_number = 0 bus_id = 0 max_tagged_dev_openings = 0 max_dev_openings = 0 flags = 0x2 callout = 0xc3574c3c (struct callout) devq = 0xc3574c80 (struct cam_devq) refcount = 2 ccb_freeq = -> 0 (struct ccb_hdr *) max_ccbs = 8 ccb_count = 0 db> show cam_et 0xc35df540 CAM Existing Target information: ed_entries = -> 0xc356d800 (struct cam_ed *) links = -> 0 (struct cam_et *) bus = 0xc35df5c0 (struct cam_eb *) target_id = 4294967295 refcount = 2 generation = 1 last_reset = 0.0[s] db> show cam_ed 0xc356d800 CAM Existing Device information: links = -> 0 (struct cam_ed *) alloc_ccb_entry send_ccb_entry target = 0xc35df540 (struct cam_et *) sim = 0xc3574c00 (struct cam_sim *) lun_id = 4294967295 drvq ccbq asyncs periphs = -> 0xc3574b80 (struct cam_periph *) generation = 1 owner = 0 (struct cam_periph *) quirk = 0 (void *) maxtags = 1 mintags = 1 protocol protocol_version = 0 transport transport_version = 0 inq_data ident_data inq_flags = 0x0 queue_flags = 0x0 serial_num_len = 0 serial_num = 0 (u_int8_t *) flags = 0x1 tag_delay_count = 0 tag_saved_openings = 0 refcount = 2 callout = 0xc356dbd0 (struct callout) db> show cam_periph 0xc3574b80 CAM Peripheral information: pinfo periph_start = 0 (periph_start_t *) periph_oninval = 0 (periph_oninval *) periph_dtor = 0 (periph_dtor_t *) periph_name = xpt path = 0xc35613b0 (struct cam_path *) softc = 0 (void *) sim = 0xc3574c00 (struct cam_sim *) unit_number = 0 type = 0x0 flags = 0x0 immediate_priority = 4294967295 refcount = 0 ccb_list = -> 0 (struct ccb_hdr *) periph_links = -> 0 (struct cam_periph *) unit_links = -> 0 (struct cam_periph *) deferred_callback = 0 (ac_callback_t *) deferred_ac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - patch: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- sys/cam/cam_periph.c.orig 2010-01-28 17:41:30.000000000 +0900 +++ sys/cam/cam_periph.c 2010-02-28 11:09:19.984247259 +0900 @@ -58,6 +58,12 @@ #include #include +#include "opt_ddb.h" + +#ifdef DDB +#include +#endif + static u_int camperiphnextunit(struct periph_driver *p_drv, u_int newunit, int wired, path_id_t pathid, target_id_t target, @@ -1859,3 +1865,42 @@ return (error); } + +#ifdef DDB +static void +cam_show_cam_periph(struct cam_periph *periph) +{ + if (periph == NULL) + return; + + db_printf("CAM Peripheral information:\n"); + + db_printf(" pinfo\n"); + db_printf(" periph_start = %p (periph_start_t *)\n", periph->periph_start); + db_printf(" periph_oninval = %p (periph_oninval *)\n", periph->periph_oninval); + db_printf(" periph_dtor = %p (periph_dtor_t *)\n", periph->periph_dtor); + db_printf(" periph_name = %s\n", periph->periph_name); + db_printf(" path = %p (struct cam_path *)\n", periph->path); + db_printf(" softc = %p (void *)\n", periph->softc); + db_printf(" sim = %p (struct cam_sim *)\n", periph->sim); + db_printf(" unit_number = %u\n", periph->unit_number); + db_printf(" type = 0x%x\n", periph->type); + db_printf(" flags = 0x%x\n", periph->flags); + db_printf(" immediate_priority = %u\n", periph->immediate_priority); + db_printf(" refcount = %u\n", periph->refcount); + db_printf(" ccb_list = -> %p (struct ccb_hdr *)\n", SLIST_FIRST(&periph->ccb_list)); + db_printf(" periph_links = -> %p (struct cam_periph *)\n", SLIST_NEXT(periph, periph_links)); + db_printf(" unit_links = -> %p (struct cam_periph *)\n", TAILQ_NEXT(periph, unit_links)); db_printf(" deferred_callback = %p (ac_callback_t *)\n", periph->deferred_callback); + db_printf(" deferred_ac\n"); +} + +DB_SHOW_COMMAND(cam_periph, db_show_cam_periph) +{ + if (!have_addr) { + db_printf("usage: show cam_periph \n"); + return; + } + + cam_show_cam_periph((struct cam_periph*)addr); +} +#endif --- sys/cam/cam_sim.c.orig 2010-01-28 22:45:23.512540000 +0900 +++ sys/cam/cam_sim.c 2010-02-28 11:10:17.866613899 +0900 @@ -41,6 +41,12 @@ #include #include +#include "opt_ddb.h" + +#ifdef DDB +#include +#endif + #define CAM_PATH_ANY (u_int32_t)-1 MALLOC_DEFINE(M_CAMSIM, "CAM SIM", "CAM SIM buffers"); @@ -145,3 +151,43 @@ { sim->path_id = path_id; } + +#ifdef DDB +static void +cam_show_cam_sim(struct cam_sim *sim) +{ + if (sim == NULL) + return; + + db_printf("SIM(SCSI Interface Module) information:\n"); + db_printf(" sim_action = %p\n", sim->sim_action); + db_printf(" sim_poll = %p\n", sim->sim_poll); + db_printf(" sim_name = %s\n", sim->sim_name); + db_printf(" softc = %p (void *)\n", sim->softc); + db_printf(" mtx = %p (struct mtx *)\n", sim->mtx); + db_printf(" sim_doneq = -> %p (struct ccb_hdr *)\n", TAILQ_FIRST(&sim->sim_doneq)); + db_printf(" links = -> %p (struct cam_sim *)\n", TAILQ_NEXT(sim, links)); + db_printf(" path_id = %u\n", sim->path_id); + db_printf(" unit_number = %u\n", sim->unit_number); + db_printf(" bus_id = %u\n", sim->bus_id); + db_printf(" max_tagged_dev_openings = %d\n", sim->max_tagged_dev_openings); + db_printf(" max_dev_openings = %d\n", sim->max_dev_openings); + db_printf(" flags = 0x%x\n", sim->flags); + db_printf(" callout = %p (struct callout)\n", &sim->callout); + db_printf(" devq = %p (struct cam_devq)\n", sim->devq); + db_printf(" refcount = %d\n", sim->refcount); + db_printf(" ccb_freeq = -> %p (struct ccb_hdr *)\n", SLIST_FIRST(&sim->ccb_freeq)); + db_printf(" max_ccbs = %u\n", sim->max_ccbs); + db_printf(" ccb_count = %u\n", sim->ccb_count); +} + +DB_SHOW_COMMAND(cam_sim, db_show_cam_sim) +{ + if (!have_addr) { + db_printf("usage: show cam_sim \n"); + return; + } + + cam_show_cam_sim((struct cam_sim*)addr); +} +#endif --- sys/cam/cam_xpt.c.orig 2010-02-26 19:33:48.000000000 +0900 +++ sys/cam/cam_xpt.c 2010-02-28 11:24:55.338945930 +0900 @@ -69,6 +69,11 @@ #include #include /* for xpt_print below */ #include "opt_cam.h" +#include "opt_ddb.h" + +#ifdef DDB +#include +#endif /* * This is the maximum number of high powered commands (e.g. start unit) @@ -4920,3 +4925,135 @@ } } +#ifdef DDB +static void +cam_show_cam_eb(struct cam_eb *bus) +{ + if (bus == NULL) + return; + + db_printf("CAM Existing Bus information:\n"); + db_printf(" et_entries = -> %p (struct cam_et *)\n", TAILQ_FIRST(&bus->et_entries)); + db_printf(" links = -> %p (struct cam_eb *)\n", TAILQ_NEXT(bus, links)); + db_printf(" path_id = %u\n", bus->path_id); + db_printf(" sim = %p (struct cam_sim *)\n", bus->sim); + db_printf(" last_reset = %lu.%ld[s]\n", (long)bus->last_reset.tv_sec, bus->last_reset.tv_usec/1000); + db_printf(" flags = 0x%x\n", bus->flags); + db_printf(" refcount = %u\n", bus->refcount); + db_printf(" generation = %u\n", bus->generation); + db_printf(" parent_dev = %p (device_t)\n", bus->parent_dev); + db_printf(" xport = %p (struct xpt_xport *)\n", bus->xport); +} + +static void +cam_show_cam_et(struct cam_et *tar) +{ + if (tar == NULL) + return; + + db_printf("CAM Existing Target information:\n"); + db_printf(" ed_entries = -> %p (struct cam_ed *)\n", TAILQ_FIRST(&tar->ed_entries)); + db_printf(" links = -> %p (struct cam_et *)\n", TAILQ_NEXT(tar, links)); + db_printf(" bus = %p (struct cam_eb *)\n", tar->bus); + db_printf(" target_id = %u\n", tar->target_id); + db_printf(" refcount = %u\n", tar->refcount); + db_printf(" generation = %u\n", tar->generation); + db_printf(" last_reset = %lu.%ld[s]\n", (long)tar->last_reset.tv_sec, tar->last_reset.tv_usec/1000); +} + +static void +cam_show_cam_ed(struct cam_ed *dev) +{ + if (dev == NULL) + return; + + db_printf("CAM Existing Device information:\n"); + db_printf(" links = -> %p (struct cam_ed *)\n", TAILQ_NEXT(dev, links)); + db_printf(" alloc_ccb_entry\n"); + db_printf(" send_ccb_entry\n"); + db_printf(" target = %p (struct cam_et *)\n", dev->target); + db_printf(" sim = %p (struct cam_sim *)\n", dev->sim); + db_printf(" lun_id = %u\n", dev->lun_id); + db_printf(" drvq\n"); + db_printf(" ccbq\n"); + db_printf(" asyncs\n"); + db_printf(" periphs = -> %p (struct cam_periph *)\n", SLIST_FIRST(&dev->periphs)); + db_printf(" generation = %u\n", dev->generation); + db_printf(" owner = %p (struct cam_periph *)\n", dev->owner); + db_printf(" quirk = %p (void *)\n", dev->quirk); + db_printf(" maxtags = %u\n", dev->maxtags); + db_printf(" mintags = %u\n", dev->mintags); + db_printf(" protocol\n"); + db_printf(" protocol_version = %u\n", dev->protocol_version); + db_printf(" transport\n"); + db_printf(" transport_version = %u\n", dev->transport_version); + db_printf(" inq_data\n"); + db_printf(" ident_data\n"); + db_printf(" inq_flags = 0x%x\n", dev->inq_flags); + db_printf(" queue_flags = 0x%x\n", dev->queue_flags); + db_printf(" serial_num_len = %u\n", dev->serial_num_len); + db_printf(" serial_num = %p (u_int8_t *)\n", dev->serial_num); + db_printf(" flags = 0x%x\n", dev->flags); + db_printf(" tag_delay_count = %u\n", dev->tag_delay_count); + db_printf(" tag_saved_openings = %u\n", dev->tag_saved_openings); + db_printf(" refcount = %u\n", dev->refcount); + db_printf(" callout = %p (struct callout)\n", &dev->callout); +} + +DB_SHOW_COMMAND(cam_eb, db_show_cam_eb) +{ + if (!have_addr) { + db_printf("usage: show cam_eb \n"); + return; + } + + cam_show_cam_eb((struct cam_eb*)addr); +} + +DB_SHOW_COMMAND(cam_et, db_show_cam_et) +{ + if (!have_addr) { + db_printf("usage: show cam_et \n"); + return; + } + + cam_show_cam_et((struct cam_et*)addr); +} + +DB_SHOW_COMMAND(cam_ed, db_show_cam_ed) +{ + if (!have_addr) { + db_printf("usage: show cam_ed \n"); + return; + } + + cam_show_cam_ed((struct cam_ed*)addr); +} + +DB_SHOW_COMMAND(cam, db_show_cam) +{ + struct cam_eb *bus, *next_bus; + struct cam_et *tar; + struct cam_ed *dev; + struct cam_periph *periph; + + db_printf("Transport layer configuration information:\n"); + for (bus = TAILQ_FIRST(&xsoftc.xpt_busses); + bus != NULL; bus = next_bus) { + next_bus = TAILQ_NEXT(bus, links); + db_printf(" cam_eb = %p: path_id = %u, sim_name = %s\n", bus, bus->path_id, bus->sim->sim_name); + TAILQ_FOREACH(tar, &bus->et_entries, links) { + db_printf(" cam_et = %p: target_id = %u\n", tar, tar->target_id); + TAILQ_FOREACH(dev, &tar->ed_entries, links) { + db_printf(" cam_ed = %p: lun_id = %u\n", dev, dev->lun_id); + SLIST_FOREACH(periph, &dev->periphs, periph_links) { + db_printf(" cam_periph = %p: unit_number = %u, periph_name = %s\n", periph, periph->unit_number, periph->periph_name); + } + } + } + if (db_pager_quit) + break; + } +} + +#endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From owner-freebsd-arm@FreeBSD.ORG Sun Feb 28 04:59:51 2010 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id C4D2F106566C; Sun, 28 Feb 2010 04:59:49 +0000 (UTC) (envelope-from nork@FreeBSD.org) Date: Sun, 28 Feb 2010 13:59:47 +0900 From: Norikatsu Shigemura To: Alexander Motin Message-Id: <20100228135947.acf387df.nork@FreeBSD.org> In-Reply-To: <20100228133145.e0c8bc68.nork@ninth-nine.com> References: <20100218023945.848cd01a.nork@FreeBSD.org> <4B7EF63C.7030008@FreeBSD.org> <20100226014718.c0a07c84.nork@FreeBSD.org> <20100228133145.e0c8bc68.nork@ninth-nine.com> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.5; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org, freebsd-current@FreeBSD.org, Shigemura , Norikatsu Subject: Re: ATA_CAM-ed mvsata(4) on OpenRD-client X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 04:59:51 -0000 Hi mav. On Sun, 28 Feb 2010 13:31:45 +0900 Norikatsu Shigemura wrote: > I didn't know what's happen. So I'll report code trace and > cam related struct dump with ddb which I made. Code trace with printf debug: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - periphdriver_init() @sys/cam/cam_periph.c -> adainit() @sys/cam/ata/ata_da.c OK -> probe_periph_init() @sys/cam/scsi/scsi_xpt.c OK -> pmpinit() @sys/cam/ata/ata_pmp.c FREEZE -> xpt_register_async() @sys/cam/cam_xpt.c -> xpt_for_all_devices() @sys/cam/cam_xpt.c -> xptbustraverse() @sys/cam/cam_xpt.c - - - - - in xptbustraverse() - - - - - for (bus = (start_bus ? start_bus : TAILQ_FIRST(&xsoftc.xpt_busses)); bus != NULL; bus = next_bus) { next_bus = TAILQ_NEXT(bus, links); mtx_unlock(&xsoftc.xpt_topo_lock); -> CAM_SIM_LOCK(bus->sim); freeze at this point, because of not catch lock, in the first loop. retval = tr_func(bus, arg); CAM_SIM_UNLOCK(bus->sim); if (retval == 0) return(retval); mtx_lock(&xsoftc.xpt_topo_lock); } - - - - - in xptbustraverse() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - So I dumped following mtx, cam_eb IN (0xc36c88c0, 0xc3770840, 0xc35df5c0)->sim. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - db> show lock 0xc35e5974 class: spin mutex name: flags: {SPIN} state: {OWNED, CONTESTED} owner: 0xc36c8d00 (tid 0, pid -1062090240, "") db> show lock 0xc35e5774 class: sleep mutex name: ATA state lock flags: {DEF} state: {UNOWNED} db> show lock 0xc0be5204 class: sleep mutex name: XPT lock flags: {DEF} state: {UNOWNED} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From owner-freebsd-arm@FreeBSD.ORG Mon Mar 1 04:21:40 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A80181065670; Mon, 1 Mar 2010 04:21:40 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id 0C23A8FC16; Mon, 1 Mar 2010 04:21:39 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.4/8.14.3) with ESMTP id o214Lcp0084404; Sun, 28 Feb 2010 23:21:38 -0500 (EST) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.4/8.14.3/Submit) id o214LctG084395; Mon, 1 Mar 2010 04:21:38 GMT (envelope-from tinderbox@freebsd.org) Date: Mon, 1 Mar 2010 04:21:38 GMT Message-Id: <201003010421.o214LctG084395@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on arm/arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 04:21:40 -0000 TB --- 2010-03-01 03:35:00 - tinderbox 2.6 running on freebsd-current.sentex.ca TB --- 2010-03-01 03:35:00 - starting HEAD tinderbox run for arm/arm TB --- 2010-03-01 03:35:00 - cleaning the object tree TB --- 2010-03-01 03:35:11 - cvsupping the source tree TB --- 2010-03-01 03:35:11 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/arm/arm/supfile TB --- 2010-03-01 03:37:07 - building world TB --- 2010-03-01 03:37:07 - MAKEOBJDIRPREFIX=/obj TB --- 2010-03-01 03:37:07 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2010-03-01 03:37:07 - TARGET=arm TB --- 2010-03-01 03:37:07 - TARGET_ARCH=arm TB --- 2010-03-01 03:37:07 - TZ=UTC TB --- 2010-03-01 03:37:07 - __MAKE_CONF=/dev/null TB --- 2010-03-01 03:37:07 - cd /src TB --- 2010-03-01 03:37:07 - /usr/bin/make -B buildworld >>> World build started on Mon Mar 1 03:37:08 UTC 2010 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything [...] cc -O -pipe -DUSE_BSM_AUDIT -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -o su su.o -lutil -lpam -lbsm gzip -cn /src/usr.bin/su/su.1 > su.1.gz ===> usr.bin/systat (all) cc -O -pipe -DINET6 -std=gnu99 -Wno-pointer-sign -c /src/usr.bin/systat/cmds.c cc -O -pipe -DINET6 -std=gnu99 -Wno-pointer-sign -c /src/usr.bin/systat/cmdtab.c In file included from /src/usr.bin/systat/extern.h:39, from /src/usr.bin/systat/cmdtab.c:43: /obj/arm/src/tmp/usr/include/kvm.h:72: error: expected declaration specifiers or '...' before 'u_int' *** Error code 1 Stop in /src/usr.bin/systat. *** Error code 1 Stop in /src/usr.bin. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2010-03-01 04:21:37 - WARNING: /usr/bin/make returned exit code 1 TB --- 2010-03-01 04:21:37 - ERROR: failed to build world TB --- 2010-03-01 04:21:37 - 1962.66 user 494.62 system 2797.82 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-arm-arm.full From owner-freebsd-arm@FreeBSD.ORG Mon Mar 1 09:54:39 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2961F1065675 for ; Mon, 1 Mar 2010 09:54:39 +0000 (UTC) (envelope-from mail25@bzerk.org) Received: from ei.bzerk.org (tunnel490.ipv6.xs4all.nl [IPv6:2001:888:10:1ea::2]) by mx1.freebsd.org (Postfix) with ESMTP id 916B38FC19 for ; Mon, 1 Mar 2010 09:54:38 +0000 (UTC) Received: from ei.bzerk.org (BOFH@localhost [127.0.0.1]) by ei.bzerk.org (8.14.3/8.14.3) with ESMTP id o219sWdk094825; Mon, 1 Mar 2010 10:54:32 +0100 (CET) (envelope-from mail25@bzerk.org) Received: (from bulk@localhost) by ei.bzerk.org (8.14.3/8.14.3/Submit) id o219sWjW094824; Mon, 1 Mar 2010 10:54:32 +0100 (CET) (envelope-from mail25@bzerk.org) Date: Mon, 1 Mar 2010 10:54:32 +0100 From: Ruben de Groot To: Rafal Jaworowski Message-ID: <20100301095431.GA94784@ei.bzerk.org> References: <31d643301002230334h17c03d0dg9f61b4ed9ae6724b@mail.gmail.com> <2CEFFBB0-CE3B-4157-B8BE-1DE5459BF663@semihalf.com> <31d643301002230655u6fd16d66wfedc6fb33f0d87dc@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on ei.bzerk.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (ei.bzerk.org [127.0.0.1]); Mon, 01 Mar 2010 10:54:36 +0100 (CET) Cc: freebsd-arm@freebsd.org, Matthias Rampke Subject: Re: What is the state of FreeBSD on the SheevaPlug? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 09:54:39 -0000 On Tue, Feb 23, 2010 at 10:25:04PM +0100, Rafal Jaworowski typed: > > > Rafal: is the SD driver available as a patch, as long as it's not in > > the main tree? Being able to boot from SD cards would be an almost > > ideal solution, second only to internal flash (which is still way off > > due to lack of a NAND filesystem, I know). > > There isn't ready to apply patch, sorry; while the SD/MMC driver itself is a pretty self-contained piece of code (http://people.freebsd.org/~raj/misc/mv_sdio.c), there are extensions and updates required to the GPIO code to make it work (some MMC lines go through the GPIO, we need to handle debouncing for presence detect signals and so on); we have other local GPIO modifications, and this is where some work is required to distill, clean up and reintagrate with HEAD. > > Keep nagging me about it and I'll finally complete the integration :-) I'm also very eager to see this working on FreeBSD. Would like to help as well, if I can. Any hints on how to compile this code (mv_sdio.c) into a 9-Current kernel? Thanks very much for your work on this! Ruben From owner-freebsd-arm@FreeBSD.ORG Mon Mar 1 11:06:56 2010 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 685EB1065686 for ; Mon, 1 Mar 2010 11:06:56 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 561038FC0C for ; Mon, 1 Mar 2010 11:06:56 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o21B6ulc017730 for ; Mon, 1 Mar 2010 11:06:56 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o21B6t16017728 for freebsd-arm@FreeBSD.org; Mon, 1 Mar 2010 11:06:55 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 1 Mar 2010 11:06:55 GMT Message-Id: <201003011106.o21B6t16017728@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-arm@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 11:06:56 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o arm/134368 arm [patch] nslu2_led driver for the LEDs on the NSLU2 o arm/134338 arm [patch] Lock GPIO accesses on ixp425 o arm/134092 arm [patch] NSLU.hints contains wrong hints for on board n 3 problems total. From owner-freebsd-arm@FreeBSD.ORG Tue Mar 2 15:12:35 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0A9E1065675 for ; Tue, 2 Mar 2010 15:12:35 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirj.bris.ac.uk (dirj.bris.ac.uk [137.222.10.78]) by mx1.freebsd.org (Postfix) with ESMTP id B0FC18FC1C for ; Tue, 2 Mar 2010 15:12:35 +0000 (UTC) Received: from ncsd.bris.ac.uk ([137.222.10.59] helo=ncs.bris.ac.uk) by dirj.bris.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1NmTXN-0007Hu-SC for freebsd-arm@freebsd.org; Tue, 02 Mar 2010 14:57:29 +0000 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncs.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1NmTXN-0001qf-PN for freebsd-arm@freebsd.org; Tue, 02 Mar 2010 14:57:29 +0000 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.3/8.14.3) with ESMTP id o22EvT6T088521 for ; Tue, 2 Mar 2010 14:57:29 GMT (envelope-from mexas@bristol.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.4/8.14.3/Submit) id o22EvTuC088520 for freebsd-arm@freebsd.org; Tue, 2 Mar 2010 14:57:29 GMT (envelope-from mexas@bristol.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bristol.ac.uk using -f Date: Tue, 2 Mar 2010 14:57:29 +0000 From: Anton Shterenlikht To: freebsd-arm@freebsd.org Message-ID: <20100302145729.GL63564@mech-cluster241.men.bris.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: where to start? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 15:12:36 -0000 I've been using fbsd on i386, alpha, ia64 and sparc64. I'd like to see what fbsd ARM can do for me. I can see some systems here http://www.simtec.co.uk/, but not sure what is possible to do with those. For example, can I have a graphical thin client built on ARM? This would be a box with some keyboard and a mouse, with full ports tree on some disk, and with X server running. Of course there must be a good ethernet connection to the server. Does this make sense at all? Or what about a portable ARM computer to be used for making presentations, something one can use instead of a laptop? Perhaps I'm asking the wrong questions alltogether.. many thanks anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 From owner-freebsd-arm@FreeBSD.ORG Tue Mar 2 16:14:48 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DC97106564A for ; Tue, 2 Mar 2010 16:14:48 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 9CAF28FC0C for ; Tue, 2 Mar 2010 16:14:47 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o22GE8AG046036 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 2 Mar 2010 17:14:22 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o22GE6YU055676 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Mar 2010 17:14:06 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o22GE56u077540; Tue, 2 Mar 2010 17:14:05 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o22GE5M5077539; Tue, 2 Mar 2010 17:14:05 +0100 (CET) (envelope-from ticso) Date: Tue, 2 Mar 2010 17:14:05 +0100 From: Bernd Walter To: Anton Shterenlikht Message-ID: <20100302161405.GG58319@cicely7.cicely.de> References: <20100302145729.GL63564@mech-cluster241.men.bris.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100302145729.GL63564@mech-cluster241.men.bris.ac.uk> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, AWL=0.000, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: freebsd-arm@freebsd.org Subject: Re: where to start? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 16:14:48 -0000 On Tue, Mar 02, 2010 at 02:57:29PM +0000, Anton Shterenlikht wrote: > I've been using fbsd on i386, alpha, ia64 and sparc64. > I'd like to see what fbsd ARM can do for me. A very good question. I don't know every available arm board, so other may want to corrrect me here. > I can see some systems here http://www.simtec.co.uk/, > but not sure what is possible to do with those. > > For example, can I have a graphical thin client > built on ARM? This would be a box with some keyboard > and a mouse, with full ports tree on some disk, and with > X server running. Of course there must be a good > ethernet connection to the server. Does this make > sense at all? I pesonally would just take an Atom based system. Atom Systems are widely supported and easily available with many different feature sets. There are arm systems with VGA headers, but my impression is that those are just more exotic than existing x86 hardware. > Or what about a portable ARM computer to be used > for making presentations, something one can use > instead of a laptop? There are many PDA classed arm systems. I don't know which of them (if any) we support. The main problem with them is that you spend a lot of time to get them running, just to see that the vendor has upgraded to a new hardware release. I personally see arm as a good architecture for home automation controllers, small routers and such. Using self build hardware or hardware which is available over years without major changes, so you are not wasting time to get everything running. At least some of them are less power hungry than x86 alternatives. My own boards for example include an ethernet switch and take power in the 1.5W to 2.6W range, while small x86 systems typically are in the 5W to 20W range. I've build my boards exactly to the features I needed and if I need something else I can produce a new PCB on the existing design, e.g. add an FPGA for special purpose, or high speed ADC with special sensors. If you are not into self building boards you can easily source one of those many arm systems which have almost every pin routed to a header. If you want mainstream features then it is probably best to stay with mainstream hardware, since it has better availability and support. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Tue Mar 2 22:23:57 2010 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED8C8106566B for ; Tue, 2 Mar 2010 22:23:57 +0000 (UTC) (envelope-from torfing@broadpark.no) Received: from eterpe-smout.broadpark.no (eterpe-smout.broadpark.no [80.202.8.16]) by mx1.freebsd.org (Postfix) with ESMTP id AA9A78FC15 for ; Tue, 2 Mar 2010 22:23:57 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from ignis-smin.broadpark.no ([unknown] [80.202.8.11]) by eterpe-smout.broadpark.no (Sun Java(tm) System Messaging Server 7u3-12.01 64bit (built Oct 15 2009)) with ESMTP id <0KYO00877BDQ9X60@eterpe-smout.broadpark.no> for freebsd-arm@FreeBSD.org; Tue, 02 Mar 2010 22:22:38 +0100 (CET) Received: from kg-v2.kg4.no ([unknown] [80.203.92.186]) by ignis-smin.broadpark.no (Sun Java(tm) System Messaging Server 7u3-12.01 64bit (built Oct 15 2009)) with SMTP id <0KYO00L19B3VQ3A0@ignis-smin.broadpark.no> for freebsd-arm@FreeBSD.org; Tue, 02 Mar 2010 22:16:43 +0100 (CET) Date: Tue, 02 Mar 2010 22:23:07 +0100 From: Torfinn Ingolfsen To: freebsd-arm@FreeBSD.org Message-id: <20100302222307.c7253369.torfinn.ingolfsen@broadpark.no> In-reply-to: <20100302161405.GG58319@cicely7.cicely.de> References: <20100302145729.GL63564@mech-cluster241.men.bris.ac.uk> <20100302161405.GG58319@cicely7.cicely.de> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.7; amd64-portbld-freebsd8.0) X-Face: "t9w2,-X@O^I`jVW\sonI3.,36KBLZE*AL[y9lL[PyFD*r_S:dIL9c[8Y>V42R0"!"yb_zN,f#%.[PYYNq; m"_0v; ~rUM2Yy!zmkh)3&U|u!=T(zyv,MHJv"nDH>OJ`t(@mil461d_B'Uo|'nMwlKe0Mv=kvV?Nh@>Hb<3s_z2jYgZhPb@?Wi^x1a~Hplz1.zH Cc: Subject: Re: where to start? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 22:23:58 -0000 On Tue, 02 Mar 2010 17:14:05 +0100 Bernd Walter wrote: > There are many PDA classed arm systems. > I don't know which of them (if any) we support. Would the SmartQ V5[1] be supported by FreeBSD It would be nice if it was possible to exchange the (useless) WinCE partition on this device with a FreeBSD partition. Yes, even if FreeBSD would be (almost) useless at first. :-) References: 1) http://en.smartdevices.com.cn/Products/V5/200912/30-45.html -- Torfinn From owner-freebsd-arm@FreeBSD.ORG Tue Mar 2 23:30:58 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 319D11065672 for ; Tue, 2 Mar 2010 23:30:58 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id E879C8FC3D for ; Tue, 2 Mar 2010 23:30:57 +0000 (UTC) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.3/8.14.3) with ESMTP id o22NUv1D029386 for ; Tue, 2 Mar 2010 17:30:57 -0600 (CST) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1267572657; bh=c7u3pfhq12x/imYK0vI5tUxZ90GZgLdcnn5tc0h8Ck8=; h=Date:From:Message-Id:To:Subject:In-Reply-To; b=DJaVUodylhDvwf1rKClC+D8BqMcbRMMyCHysVFhc064SfKDzJUKTU4AXsY1uRLoYo 96f0OJ4Mqc00X1Lvg2XpQRxUTZassfQhAlsgR6ZBSLojEjr/PBqeiOu5H4gBd6hcQF yPSUdBBblDywOaVIvXWr9LGS3tliQqJQU4RzPhDs= Received: (from tinguely@localhost) by casselton.net (8.14.3/8.14.2/Submit) id o22NUueA029385 for freebsd-arm@freebsd.org; Tue, 2 Mar 2010 17:30:56 -0600 (CST) (envelope-from tinguely) Date: Tue, 2 Mar 2010 17:30:56 -0600 (CST) From: Mark Tinguely Message-Id: <201003022330.o22NUueA029385@casselton.net> To: freebsd-arm@freebsd.org In-Reply-To: <20100302222307.c7253369.torfinn.ingolfsen@broadpark.no> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.2 (casselton.net [127.0.0.1]); Tue, 02 Mar 2010 17:30:57 -0600 (CST) Subject: Re: where to start? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 23:30:58 -0000 ARM is a family of cores. Within each ARM core version there are several implementations with their own the buses/devices that surround the core. Each chip family is a major port. As mentioned, the core ports that exists - for example the SheevaPlug, Linksys NSLU2, and the old Gumstix (PXA255), make great small stand-alone applications server, routers. Besides the PDA, smartphones, there is an ARMv7 handhold called the Pandora (http://www.open-pandora.org/) running Linux. IMO, it would take some serious money to support it under FreeBSD. --Mark Tinguely From owner-freebsd-arm@FreeBSD.ORG Tue Mar 2 23:34:38 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90BFF1065676 for ; Tue, 2 Mar 2010 23:34:38 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 61EC98FC31 for ; Tue, 2 Mar 2010 23:34:38 +0000 (UTC) Received: from compute1.internal (compute1 [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id BEC4EE2E1C for ; Tue, 2 Mar 2010 18:34:37 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 02 Mar 2010 18:34:37 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=date:from:to:subject:message-id:in-reply-to:references:mime-version:content-type:content-transfer-encoding; s=smtpout; bh=uL7dQum6a/gSIpKbFc/95YV7bQ4=; b=ljqgMT8Kk3SZdaUNoyjhCRixl843fcGb/xc8/KPVaZ0cxBWPG3TlqI2BW+eyM4/XNxHOw1LlA2lGws0PK6L2mLQvjFXf7gRwr5mVhFbETA0PMRFCAnss2CU/Tx4ILRJe4C1DhfhYSojGeYFUbvtewKFyP2AqaxOIeGYrylj56II= X-Sasl-enc: H+eB6E4HmsV1aenGv+U+tgJeQ7TPzWmBc2AZzHGBaXv3 1267572876 Received: from localhost (11.24.255.123.static.snap.net.nz [123.255.24.11]) by mail.messagingengine.com (Postfix) with ESMTPA id A16481B99D for ; Tue, 2 Mar 2010 18:34:36 -0500 (EST) Date: Wed, 3 Mar 2010 12:34:40 +1300 From: Andrew Turner To: freebsd-arm@freebsd.org Message-ID: <20100303123440.2fb48f9a@fubar.geek.nz> In-Reply-To: <20100211223402.621a8c89@fubar.geek.nz> References: <20100211223402.621a8c89@fubar.geek.nz> X-Mailer: Claws Mail 3.7.5 (GTK+ 2.18.7; amd64-portbld-freebsd8.0) X-Pirate: Arrrr Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: New S3C24x0 patch X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 23:34:38 -0000 I've posted a new patch at [1] taking into account the changes suggested to me either via this list or privately. Andrew [1] http://fubar.geek.nz/files/freebsd/s3c2xx0/freebsd-s3c24x0-20100227.diff From owner-freebsd-arm@FreeBSD.ORG Wed Mar 3 09:54:17 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9147A106566B for ; Wed, 3 Mar 2010 09:54:17 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirj.bris.ac.uk (dirj.bris.ac.uk [137.222.10.78]) by mx1.freebsd.org (Postfix) with ESMTP id 50A118FC0C for ; Wed, 3 Mar 2010 09:54:17 +0000 (UTC) Received: from ncsc.bris.ac.uk ([137.222.10.41]) by dirj.bris.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1NmlHU-0000bM-Ak; Wed, 03 Mar 2010 09:54:16 +0000 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncsc.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1NmlHU-0004fp-3W; Wed, 03 Mar 2010 09:54:16 +0000 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.3/8.14.3) with ESMTP id o239sFmq096566; Wed, 3 Mar 2010 09:54:15 GMT (envelope-from mexas@bristol.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.4/8.14.3/Submit) id o239sF3i096565; Wed, 3 Mar 2010 09:54:15 GMT (envelope-from mexas@bristol.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bristol.ac.uk using -f Date: Wed, 3 Mar 2010 09:54:15 +0000 From: Anton Shterenlikht To: Mark Tinguely Message-ID: <20100303095415.GA96548@mech-cluster241.men.bris.ac.uk> References: <20100302222307.c7253369.torfinn.ingolfsen@broadpark.no> <201003022330.o22NUueA029385@casselton.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201003022330.o22NUueA029385@casselton.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-arm@freebsd.org Subject: Re: where to start? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 09:54:17 -0000 On Tue, Mar 02, 2010 at 05:30:56PM -0600, Mark Tinguely wrote: > > ARM is a family of cores. Within each ARM core version there are several > implementations with their own the buses/devices that surround the core. > Each chip family is a major port. > > As mentioned, the core ports that exists - for example the SheevaPlug, > Linksys NSLU2, and the old Gumstix (PXA255), make great small stand-alone > applications server, routers. > > Besides the PDA, smartphones, there is an ARMv7 handhold called the Pandora > (http://www.open-pandora.org/) running Linux. IMO, it would take some serious > money to support it under FreeBSD. I think ARM is not for me. many thanks anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 From owner-freebsd-arm@FreeBSD.ORG Wed Mar 3 15:41:26 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40CDC106566B; Wed, 3 Mar 2010 15:41:26 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id E37558FC1B; Wed, 3 Mar 2010 15:41:25 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.4/8.14.3) with ESMTP id o23FfP6s010033; Wed, 3 Mar 2010 10:41:25 -0500 (EST) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.4/8.14.3/Submit) id o23FfPa8010019; Wed, 3 Mar 2010 15:41:25 GMT (envelope-from tinderbox@freebsd.org) Date: Wed, 3 Mar 2010 15:41:25 GMT Message-Id: <201003031541.o23FfPa8010019@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on arm/arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 15:41:26 -0000 TB --- 2010-03-03 15:15:00 - tinderbox 2.6 running on freebsd-current.sentex.ca TB --- 2010-03-03 15:15:00 - starting HEAD tinderbox run for arm/arm TB --- 2010-03-03 15:15:00 - cleaning the object tree TB --- 2010-03-03 15:15:12 - cvsupping the source tree TB --- 2010-03-03 15:15:12 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/arm/arm/supfile TB --- 2010-03-03 15:15:54 - building world TB --- 2010-03-03 15:15:54 - MAKEOBJDIRPREFIX=/obj TB --- 2010-03-03 15:15:54 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2010-03-03 15:15:54 - TARGET=arm TB --- 2010-03-03 15:15:54 - TARGET_ARCH=arm TB --- 2010-03-03 15:15:54 - TZ=UTC TB --- 2010-03-03 15:15:54 - __MAKE_CONF=/dev/null TB --- 2010-03-03 15:15:54 - cd /src TB --- 2010-03-03 15:15:54 - /usr/bin/make -B buildworld >>> World build started on Wed Mar 3 15:15:55 UTC 2010 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies [...] lex -t /src/usr.bin/csup/token.l > token.c rm -f .depend mkdep -f .depend -a -I. -DHAVE_FFLAGS -DNDEBUG /src/usr.bin/csup/attrstack.c /src/usr.bin/csup/auth.c /src/usr.bin/csup/config.c /src/usr.bin/csup/detailer.c /src/usr.bin/csup/diff.c /src/usr.bin/csup/fattr.c /src/usr.bin/csup/fixups.c /src/usr.bin/csup/fnmatch.c /src/usr.bin/csup/globtree.c /src/usr.bin/csup/idcache.c /src/usr.bin/csup/keyword.c /src/usr.bin/csup/lex.rcs.c /src/usr.bin/csup/lister.c /src/usr.bin/csup/main.c /src/usr.bin/csup/misc.c /src/usr.bin/csup/mux.c parse.c /src/usr.bin/csup/pathcomp.c /src/usr.bin/csup/proto.c /src/usr.bin/csup/rcsfile.c /src/usr.bin/csup/rcsparse.c /src/usr.bin/csup/rsyncfile.c /src/usr.bin/csup/status.c /src/usr.bin/csup/stream.c /src/usr.bin/csup/threads.c token.c /src/usr.bin/csup/updater.c /src/usr.bin/csup/parse.y:32:20: error: config.h: No such file or directory /src/usr.bin/csup/parse.y:33:19: error: token.h: No such file or directory /src/usr.bin/csup/token.l:35:18: error: misc.h: No such file or directory /src/usr.bin/csup/token.l:36:19: error: token.h: No such file or directory mkdep: compile failed *** Error code 1 Stop in /src/usr.bin/csup. *** Error code 1 Stop in /src/usr.bin. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2010-03-03 15:41:25 - WARNING: /usr/bin/make returned exit code 1 TB --- 2010-03-03 15:41:25 - ERROR: failed to build world TB --- 2010-03-03 15:41:25 - 1112.38 user 309.41 system 1584.89 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-arm-arm.full From owner-freebsd-arm@FreeBSD.ORG Sat Mar 6 20:54:20 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60DF41065672 for ; Sat, 6 Mar 2010 20:54:20 +0000 (UTC) (envelope-from maksverver@geocities.com) Received: from mx.utwente.nl (mx3.utsp.utwente.nl [130.89.2.14]) by mx1.freebsd.org (Postfix) with ESMTP id DAD0C8FC15 for ; Sat, 6 Mar 2010 20:54:19 +0000 (UTC) Received: from heaven.student.utwente.nl (heaven.student.utwente.nl [130.89.167.52]) by mx.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id o26Ke0HH024592 for ; Sat, 6 Mar 2010 21:40:00 +0100 Message-ID: <4B92BD9D.6030709@geocities.com> Date: Sat, 06 Mar 2010 21:39:57 +0100 From: Maks Verver User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100209 Thunderbird/3.0.1 MIME-Version: 1.0 To: freebsd-arm@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact icts.servicedesk@utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-SpamScore: sss X-UTwente-MailScanner-From: maksverver@geocities.com X-Spam-Status: No Subject: Performance of SheevaPlug on 8-stable X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 20:54:20 -0000 Hi everyone, After a bit of patching and tinkering I got my SheevaPlug to boot FreeBSD from a UFS2-formatted USB stick. To compare it with Linux I decided to run nbench to see how FreeBSD compares with Ubuntu (which is shipped with the SheevaPlug). To my surprise, the results were atrocious! FreeBSD scores about 50 times worse than Ubuntu. Of course, this performance difference is too large to be caused by implementation differences. There must be something more fundemental wrong here. To simplify things, I created a simple testcase that counts up to the maximum value of an integer: int main() { int i = 0; do ++i; while(i > 0); return 0; } This compiles to: (both on Linux and on FreeBSD) 0000848c
: 848c: e3a03000 mov r3, #0 ; 0x0 8490: e2833001 add r3, r3, #1 ; 0x1 8494: e3530000 cmp r3, #0 ; 0x0 8498: cafffffc bgt 8490 849c: e3a00000 mov r0, #0 ; 0x0 84a0: e1a0f00e mov pc, lr This stresses the CPU and not much else. Since there are three instructions in the loop and the SheevaPlug runs at 1.2 GHz, I expect this to take around (1<<31)*3/1.2e9 ~ 5.3687 seconds. On Ubuntu: $ time ./test real 0m5.422s user 0m5.390s sys 0m0.020s Exactly as expected. On FreeBSD on the other hand: %time ./test 286.000u 0.000s 4:47.22 99.8% 40+1321k 0+0io 0pf+0w This takes almost five minutes, or over 50 times as long! All of it is user-space CPU time. Does anybody have a suggestion why the CPU appears to run so slowly in FreeBSD? I pored over my kernel configuration but I don't see anything suspect. I did (manually) apply Hans Petter Selasky's patch [1] to be able to boot from USB, and consequently removed the NFS and BOOTP stuff from the config provided at sys/arm/conf/SHEEVAPLUG. Furthermore I removed the NO_SWAPPING and NO_FFS_SNAPSHOT options (because I plan to attach a USB disk drive) and I left in the KDB and DDB options because as I think they do not significantly affect performance. Is this correct? Kind regards, Maks Verver. P.S. The strange thing is that stuff like network performance is perfectly fine. I can fetch FTP data at 11 MB/s, which is about the maximum possible on the cheap 100 Mbit switch I use, and is even a few percent better than Ubuntu. So it seems it's really the CPU that's the bottleneck, for no apparent reason. [1] http://p4db.freebsd.org/chv.cgi?CH=169183 From owner-freebsd-arm@FreeBSD.ORG Sat Mar 6 21:17:59 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 277331065672 for ; Sat, 6 Mar 2010 21:17:59 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id A80108FC12 for ; Sat, 6 Mar 2010 21:17:58 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o26LHZlw011581 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 6 Mar 2010 22:17:36 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o26LHTTA022248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 6 Mar 2010 22:17:29 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o26LHSkl006320; Sat, 6 Mar 2010 22:17:28 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o26LHGao006319; Sat, 6 Mar 2010 22:17:16 +0100 (CET) (envelope-from ticso) Date: Sat, 6 Mar 2010 22:17:16 +0100 From: Bernd Walter To: Maks Verver Message-ID: <20100306211715.GK58319@cicely7.cicely.de> References: <4B92BD9D.6030709@geocities.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B92BD9D.6030709@geocities.com> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, AWL=0.001, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: freebsd-arm@freebsd.org Subject: Re: Performance of SheevaPlug on 8-stable X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 21:17:59 -0000 On Sat, Mar 06, 2010 at 09:39:57PM +0100, Maks Verver wrote: > Hi everyone, > > After a bit of patching and tinkering I got my SheevaPlug to boot > FreeBSD from a UFS2-formatted USB stick. To compare it with Linux I > decided to run nbench to see how FreeBSD compares with Ubuntu (which is > shipped with the SheevaPlug). To my surprise, the results were > atrocious! FreeBSD scores about 50 times worse than Ubuntu. > > Of course, this performance difference is too large to be caused by > implementation differences. There must be something more fundemental > wrong here. To simplify things, I created a simple testcase that counts > up to the maximum value of an integer: > > int main() { int i = 0; do ++i; while(i > 0); return 0; } > > This compiles to: (both on Linux and on FreeBSD) > > 0000848c
: > 848c: e3a03000 mov r3, #0 ; 0x0 > 8490: e2833001 add r3, r3, #1 ; 0x1 > 8494: e3530000 cmp r3, #0 ; 0x0 > 8498: cafffffc bgt 8490 > 849c: e3a00000 mov r0, #0 ; 0x0 > 84a0: e1a0f00e mov pc, lr > > This stresses the CPU and not much else. Since there are three > instructions in the loop and the SheevaPlug runs at 1.2 GHz, I > expect this to take around (1<<31)*3/1.2e9 ~ 5.3687 seconds. On Ubuntu: > > $ time ./test > real 0m5.422s > user 0m5.390s > sys 0m0.020s > > Exactly as expected. On FreeBSD on the other hand: > > %time ./test > 286.000u 0.000s 4:47.22 99.8% 40+1321k 0+0io 0pf+0w > > This takes almost five minutes, or over 50 times as long! All of it is > user-space CPU time. Does anybody have a suggestion why the CPU appears > to run so slowly in FreeBSD? I was tempted to say different compiler optimisaitons, but you say that the resulting code is the same. Such massive speed difference sounds a bit like cache problems. For what it's worth - I see it takes minutes (not finished yet) on 180MHz RM9200 as well. According to dmesg IC is enabled: CPU: ARM920T rev 0 (ARM9TDMI core) DC enabled IC enabled WB enabled LABT 16KB/32B 64-way Instruction cache 16KB/32B 64-way write-back-locking-A Data cache If the above calculation is correct I would expect it to finish after ~7 times more time than calculated. If the calculation is wrong, then why does Ubunto agrees with it? > I pored over my kernel configuration but I don't see anything suspect. I > did (manually) apply Hans Petter Selasky's patch [1] to be able to boot > from USB, and consequently removed the NFS and BOOTP stuff from the > config provided at sys/arm/conf/SHEEVAPLUG. Furthermore I removed the > NO_SWAPPING and NO_FFS_SNAPSHOT options (because I plan to attach a USB > disk drive) and I left in the KDB and DDB options because as I think > they do not significantly affect performance. Is this correct? > > Kind regards, > Maks Verver. > > P.S. The strange thing is that stuff like network performance is > perfectly fine. I can fetch FTP data at 11 MB/s, which is about the > maximum possible on the cheap 100 Mbit switch I use, and is even a few > percent better than Ubuntu. So it seems it's really the CPU that's the > bottleneck, for no apparent reason. FTP won't win that much from cache and our network stack might outweight the loss, so this all makes sense if IC cache won't work. I think you have a very interesting catch, although I don't know why it exactly is. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Sat Mar 6 21:52:18 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBD59106564A for ; Sat, 6 Mar 2010 21:52:18 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 31C138FC12 for ; Sat, 6 Mar 2010 21:52:17 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o26LpuMQ012304 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 6 Mar 2010 22:51:56 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o26Lprg0023454 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 6 Mar 2010 22:51:53 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o26Lprnk006452; Sat, 6 Mar 2010 22:51:53 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o26Lprrd006451; Sat, 6 Mar 2010 22:51:53 +0100 (CET) (envelope-from ticso) Date: Sat, 6 Mar 2010 22:51:53 +0100 From: Bernd Walter To: Maks Verver Message-ID: <20100306215153.GL58319@cicely7.cicely.de> References: <4B92BD9D.6030709@geocities.com> <20100306211715.GK58319@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100306211715.GK58319@cicely7.cicely.de> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, AWL=0.001, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: freebsd-arm@freebsd.org Subject: Re: Performance of SheevaPlug on 8-stable X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 21:52:18 -0000 On Sat, Mar 06, 2010 at 10:17:16PM +0100, Bernd Walter wrote: > On Sat, Mar 06, 2010 at 09:39:57PM +0100, Maks Verver wrote: > > Hi everyone, > > > > After a bit of patching and tinkering I got my SheevaPlug to boot > > FreeBSD from a UFS2-formatted USB stick. To compare it with Linux I > > decided to run nbench to see how FreeBSD compares with Ubuntu (which is > > shipped with the SheevaPlug). To my surprise, the results were > > atrocious! FreeBSD scores about 50 times worse than Ubuntu. > > > > Of course, this performance difference is too large to be caused by > > implementation differences. There must be something more fundemental > > wrong here. To simplify things, I created a simple testcase that counts > > up to the maximum value of an integer: > > > > int main() { int i = 0; do ++i; while(i > 0); return 0; } > > > > This compiles to: (both on Linux and on FreeBSD) > > > > 0000848c
: > > 848c: e3a03000 mov r3, #0 ; 0x0 > > 8490: e2833001 add r3, r3, #1 ; 0x1 > > 8494: e3530000 cmp r3, #0 ; 0x0 > > 8498: cafffffc bgt 8490 > > 849c: e3a00000 mov r0, #0 ; 0x0 > > 84a0: e1a0f00e mov pc, lr > > > > This stresses the CPU and not much else. Since there are three > > instructions in the loop and the SheevaPlug runs at 1.2 GHz, I > > expect this to take around (1<<31)*3/1.2e9 ~ 5.3687 seconds. On Ubuntu: > > > > $ time ./test > > real 0m5.422s > > user 0m5.390s > > sys 0m0.020s > > > > Exactly as expected. On FreeBSD on the other hand: > > > > %time ./test > > 286.000u 0.000s 4:47.22 99.8% 40+1321k 0+0io 0pf+0w > > > > This takes almost five minutes, or over 50 times as long! All of it is > > user-space CPU time. Does anybody have a suggestion why the CPU appears > > to run so slowly in FreeBSD? > > I was tempted to say different compiler optimisaitons, but you say that > the resulting code is the same. > Such massive speed difference sounds a bit like cache problems. > For what it's worth - I see it takes minutes (not finished yet) on 180MHz > RM9200 as well. [67]chipmunk.cicely.de# ./test 2185.000u 3.000s 42:03.86 86.6% 46+1532k 0+0io 0pf+0w This is really a long time to count 2^32 with 180MHz. I would really say that there is something wrong. > According to dmesg IC is enabled: > CPU: ARM920T rev 0 (ARM9TDMI core) > DC enabled IC enabled WB enabled LABT > 16KB/32B 64-way Instruction cache > 16KB/32B 64-way write-back-locking-A Data cache > > If the above calculation is correct I would expect it to finish after > ~7 times more time than calculated. > If the calculation is wrong, then why does Ubunto agrees with it? > > > I pored over my kernel configuration but I don't see anything suspect. I > > did (manually) apply Hans Petter Selasky's patch [1] to be able to boot > > from USB, and consequently removed the NFS and BOOTP stuff from the > > config provided at sys/arm/conf/SHEEVAPLUG. Furthermore I removed the > > NO_SWAPPING and NO_FFS_SNAPSHOT options (because I plan to attach a USB > > disk drive) and I left in the KDB and DDB options because as I think > > they do not significantly affect performance. Is this correct? > > > > Kind regards, > > Maks Verver. > > > > P.S. The strange thing is that stuff like network performance is > > perfectly fine. I can fetch FTP data at 11 MB/s, which is about the > > maximum possible on the cheap 100 Mbit switch I use, and is even a few > > percent better than Ubuntu. So it seems it's really the CPU that's the > > bottleneck, for no apparent reason. > > FTP won't win that much from cache and our network stack might outweight > the loss, so this all makes sense if IC cache won't work. > I think you have a very interesting catch, although I don't know why it > exactly is. > > -- > B.Walter http://www.bwct.de > Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Sat Mar 6 22:27:39 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A909B1065672 for ; Sat, 6 Mar 2010 22:27:39 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 5142D8FC15 for ; Sat, 6 Mar 2010 22:27:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o26MPfm1033606; Sat, 6 Mar 2010 15:25:41 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 06 Mar 2010 15:26:03 -0700 (MST) Message-Id: <20100306.152603.716362616846278503.imp@bsdimp.com> To: ticso@cicely.de, ticso@cicely7.cicely.de From: "M. Warner Losh" In-Reply-To: <20100306215153.GL58319@cicely7.cicely.de> References: <4B92BD9D.6030709@geocities.com> <20100306211715.GK58319@cicely7.cicely.de> <20100306215153.GL58319@cicely7.cicely.de> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: Performance of SheevaPlug on 8-stable X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 22:27:39 -0000 In message: <20100306215153.GL58319@cicely7.cicely.de> Bernd Walter writes: : This is really a long time to count 2^32 with 180MHz. : I would really say that there is something wrong. Sounds a lot like ICACHE isn't being enabled, since a 3-liner like this should be executing entirely out of cache after the first instruction in main prefetches the cache line. Warner