From owner-freebsd-current@freebsd.org Mon Jan 8 19:14:25 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 302E4E5A81A for ; Mon, 8 Jan 2018 19:14:25 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE7B46E9A2 for ; Mon, 8 Jan 2018 19:14:24 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wr0-x241.google.com with SMTP id w50so2641062wrc.11 for ; Mon, 08 Jan 2018 11:14:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=O6lZu0j7n+K8qUgd4WVBV3Fsv0d3zrJ+sFRu9ecp05U=; b=sXDiiuHsH2ItZiiHra+Y+eM8mzr/grWIsTIRretNkoxNdPF/27uQbes7/t+Xzh8+Y7 cWE9+bdFmn52T1i0HjkGoc37Oczp52nDrTFBXqSzG4QOTbVM7NaXEqe8s1DIvAVrAyIv 3t+5VLoDZSj6DqmBPHqsI8ARtZtqxRu+6rdwItnHxxb1aZy7VmlFqApJWkbH8X2eKkHO pPQj6ndpF48RXXW3uMqWJY5T4hZUXEeAFzSjQUC++DZNdx1EnskJ1eKj7R9WU2nuRoKi z8rINdjrxmauq9eV6B2gwzf9LZ1hms66+3D88p4Agbk9JwKI2zHnhBGIaDdNYzw6GYxk k9LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=O6lZu0j7n+K8qUgd4WVBV3Fsv0d3zrJ+sFRu9ecp05U=; b=s+CEwC/d1TsZ7nqVGCjnpS8xBzfIKgGh6FF77ZvjE7D+5Kph/bK+j+aonbM3UXfMu3 kYgrB0Yge5eOtFaMfq06y5zty10520rPOp2Fs3lo/WJXm7sSARLLCrWUKWT2t/QyjaZR kE2haqnslIG4bvjuDvW1P+i+Wt1ZgEVs7CKFpCL1mplqDMU2wm7Mj1tQZNISJwM8ys3+ yWJto8WP6jnb8jJplNEUrB1EMb+qgXJSt1IJGwXpiKOmVSCqRM97sXJ/Wmcck8axxHNg F3Bhe/catAQOvX6/RmmPDgZmrwxWuI47rr9VTTKx9e43BMarjiJcUVJEB/nsT/Viq2IX DYaA== X-Gm-Message-State: AKGB3mK2oldO0mbYfwe2zP8O+jkkioWBW1R4kIZW0WroxiN9cfWSRZx6 ous17bHajLGnhx/d05/Hxfo= X-Google-Smtp-Source: ACJfBou907XuojuQo0BxmXVyHKQ77X7YxrNSrlOnMlWvWpuN6E1rh4aD8mRp4Vw58xmkDgqTW0R6oA== X-Received: by 10.223.184.195 with SMTP id c3mr12281866wrg.9.1515438863040; Mon, 08 Jan 2018 11:14:23 -0800 (PST) Received: from ernst.home (p5B023419.dip0.t-ipconnect.de. [91.2.52.25]) by smtp.gmail.com with ESMTPSA id v23sm10535828wmh.30.2018.01.08.11.14.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Jan 2018 11:14:21 -0800 (PST) Date: Mon, 8 Jan 2018 20:14:20 +0100 From: Gary Jennejohn To: blubee blubeeme Cc: Jon Brawn , Warner Losh , "O'Connor, Daniel" , FreeBSD current Subject: Re: USB stack Message-ID: <20180108201420.4ee17dfb@ernst.home> In-Reply-To: References: <1FD1FE97-D25C-4BAC-A3E0-F22509FB0C2B@dons.net.au> <6A4FF1B9-D98B-4E73-9E3E-E951749E0C21@dons.net.au> <20180104092349.2821f9f9@ernst.home> <18F01F2F-8907-4CF8-A80A-B6B5C16593B7@dons.net.au> <6ADAB19C-3EC6-476D-9B89-3B29EF9EC087@brawn.org> Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jan 2018 19:14:25 -0000 On Mon, 8 Jan 2018 13:17:22 +0800 blubee blubeeme wrote: > On Mon, Jan 8, 2018 at 8:03 AM, Jon Brawn wrote: > > > > > > > > On Jan 7, 2018, at 5:44 PM, Jon Brawn wrote: > > > > > > > > >> On Jan 6, 2018, at 10:18 PM, blubee blubeeme > > wrote: > > >> > > >> On Sun, Jan 7, 2018 at 12:11 PM, Warner Losh wrote: > > >> > > >>> > > >>> > > >>> On Sat, Jan 6, 2018 at 8:56 PM, blubee blubeeme > > >>> wrote: > > >>> > > >>>> I ask does FreeBSD usb stack actually implements USB spec 2.0 or > > greater > > >>>> and the topic gets derailed...? > > >>>> > > >>> > > >>> Yes, it does. > > >>> > > >>> > > >>>> Are you guys saying that 7-8MB/s is USB speeds? > > >>>> > > >>> > > >>> I've gotten up to 24MB/s for maybe a decade. That's not possible with > > USB > > >>> 1.x. More recently, I've maxed out the writes on a USB stick at about > > >>> 75MB/s (the fastest it will do), which isn't possible with USB 2.0... > > I've > > >>> not tried USB3 with an SSD that can do more.... > > >>> > > >>> Warner > > >>> > > >>> > > >>>> On Thu, Jan 4, 2018 at 6:44 PM, O'Connor, Daniel > > >>>> wrote: > > >>>> > > >>>>> > > >>>>> > > >>>>>> On 4 Jan 2018, at 09:23, Gary Jennejohn > > wrote: > > >>>>>>> What is an "LG v30"? > > >>>>>>> > > >>>>>> It's a smartphone from LG and only supports USB2 speed. The > > reported > > >>>>>> transfer rate is no big surprise. > > >>>>> > > >>>>> OK thanks. > > >>>>> > > >>>>> -- > > >>>>> Daniel O'Connor > > >>>>> "The nice thing about standards is that there > > >>>>> are so many of them to choose from." > > >>>>> -- Andrew Tanenbaum > > >>>>> GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C > > >>>>> > > >>>>> > > >>>> _______________________________________________ > > >>>> freebsd-current@freebsd.org mailing list > > >>>> https://lists.freebsd.org/mailman/listinfo/freebsd-current > > >>>> To unsubscribe, send any mail to "freebsd-current-unsubscribe@ > > freebsd.org > > >>>> " > > >>>> > > >>> > > >>> I just connected a Transcend StorageJet 1TB hdd not a mobile phone > > >> ------------------------------------------------------------------- > > >> Jan 7 11:56:56 blubee kernel: umass0 on uhub0 > > >> Jan 7 11:56:56 blubee kernel: umass0: > >> Transcend, class 0/0, rev 3.00/80.00, addr 4> on usbus0 > > >> Jan 7 11:56:56 blubee kernel: umass0: SCSI over Bulk-Only; quirks = > > 0x0100 > > >> Jan 7 11:56:56 blubee kernel: umass0:3:0: Attached to scbus3 > > >> Jan 7 11:56:56 blubee kernel: da0 at umass-sim0 bus 0 scbus3 target 0 > > lun 0 > > >> Jan 7 11:56:56 blubee kernel: da0: Fixed Direct > > >> Access SPC-4 SCSI device > > >> Jan 7 11:56:56 blubee kernel: da0: Serial Number W9328YZN > > >> Jan 7 11:56:56 blubee kernel: da0: 400.000MB/s transfers > > >> Jan 7 11:56:56 blubee kernel: da0: 953869MB (1953525168 512 byte > > sectors) > > >> Jan 7 11:56:56 blubee kernel: da0: quirks=0x2 > > >> Jan 7 12:06:08 blubee kernel: lock order reversal: > > >> Jan 7 12:06:08 blubee kernel: 1st 0xfffffe07c26336c0 bufwait > > (bufwait) @ > > >> /usr/src/sys/vm/vm_pager.c:374 > > >> Jan 7 12:06:08 blubee kernel: 2nd 0xfffff80148c425f0 zfs (zfs) @ > > >> /usr/src/sys/dev/md/md.c:952 > > >> Jan 7 12:06:08 blubee kernel: stack backtrace: > > >> Jan 7 12:06:08 blubee kernel: #0 0xffffffff80acfa03 at > > >> witness_debugger+0x73 > > >> Jan 7 12:06:08 blubee kernel: #1 0xffffffff80acf882 at > > >> witness_checkorder+0xe02 > > >> Jan 7 12:06:08 blubee kernel: #2 0xffffffff80a41b8e at > > >> lockmgr_lock_fast_path+0x1ae > > >> Jan 7 12:06:08 blubee kernel: #3 0xffffffff81094309 at > > VOP_LOCK1_APV+0xd9 > > >> Jan 7 12:06:08 blubee kernel: #4 0xffffffff80b4ac36 at _vn_lock+0x66 > > >> Jan 7 12:06:08 blubee kernel: #5 0xffffffff80611d32 at > > mdstart_vnode+0x442 > > >> Jan 7 12:06:08 blubee kernel: #6 0xffffffff806102ce at md_kthread+0x1fe > > >> Jan 7 12:06:08 blubee kernel: #7 0xffffffff80a2d654 at fork_exit+0x84 > > >> Jan 7 12:06:08 blubee kernel: #8 0xffffffff80ef5e0e at > > fork_trampoline+0xe > > >> Jan 7 12:06:15 blubee kernel: lock order reversal: > > >> Jan 7 12:06:15 blubee kernel: 1st 0xfffffe07c41d5dc0 bufwait > > (bufwait) @ > > >> /usr/src/sys/kern/vfs_bio.c:3562 > > >> Jan 7 12:06:15 blubee kernel: 2nd 0xfffff8002bb31a00 dirhash > > (dirhash) @ > > >> /usr/src/sys/ufs/ufs/ufs_dirhash.c:281 > > >> Jan 7 12:06:15 blubee kernel: stack backtrace: > > >> Jan 7 12:06:15 blubee kernel: #0 0xffffffff80acfa03 at > > >> witness_debugger+0x73 > > >> Jan 7 12:06:15 blubee kernel: #1 0xffffffff80acf882 at > > >> witness_checkorder+0xe02 > > >> Jan 7 12:06:15 blubee kernel: #2 0xffffffff80a748a8 at _sx_xlock+0x68 > > >> Jan 7 12:06:15 blubee kernel: #3 0xffffffff80d6a28d at > > ufsdirhash_add+0x3d > > >> Jan 7 12:06:15 blubee kernel: #4 0xffffffff80d6d119 at > > ufs_direnter+0x459 > > >> Jan 7 12:06:15 blubee kernel: #5 0xffffffff80d76313 at > > ufs_makeinode+0x613 > > >> Jan 7 12:06:15 blubee kernel: #6 0xffffffff80d71ff4 at ufs_create+0x34 > > >> Jan 7 12:06:15 blubee kernel: #7 0xffffffff810919e3 at > > VOP_CREATE_APV+0xd3 > > >> Jan 7 12:06:15 blubee kernel: #8 0xffffffff80b4a53d at > > vn_open_cred+0x2ad > > >> Jan 7 12:06:15 blubee kernel: #9 0xffffffff80b42e92 at > > kern_openat+0x212 > > >> Jan 7 12:06:15 blubee kernel: #10 0xffffffff80f16d2b at > > amd64_syscall+0x79b > > >> Jan 7 12:06:15 blubee kernel: #11 0xffffffff80ef5b7b at > > Xfast_syscall+0xfb > > >> > > >> > > >> Is the slow transfers user error? > > > > > > Wotcha! > > > > > > I don___t see any read or write performance figures anywhere? Also, is > > this CURRENT? If so, aren___t all the debug / warning features that are > > turned on by default in CURRENT at the moment going to have an effect on > > throughput? Especially if you___re writing through a filesystem where > > directory and file accesses will each require a lock to be taken, if only > > for a short while? If you want to get closer to the true USB speed of the > > device, stop mounting it and copying files to the filesystem, but instead > > just dd data onto and off of the device directly, and measure how fast that > > goes. Remember to backup your data from the card first___ > > > > > > Jon. > > > > > > > > > > Also, is the SD card physically inside the phone, and you are using a USB > > cord to connect the phone to the FreeBSD computer by any chance? > > > > Jon > > > > @Mark Millard > I use sysutils/simple-mtpfs to mount the android device. > when I mount the phone through USB this is the relevant section: > /dev/fuse 356311 78912 277398 22% > /mnt > FUSE = Filesystem in Userspace and is inherently slow. You can't expect good performance from it. For example, when I mount NTFS with FUSE I get only about 30MBps. Windows manages about 100MBps. I mounted the SD card in my smart phone under Windows and got a transfer rate of about 23MBps. Given how slow fuse is I'd say that the aprroximately 7MBps you're seeing is to be expected. [snip] -- Gary Jennejohn