From owner-freebsd-current@freebsd.org Mon Jul 4 06:51:48 2016 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 EE9FDB90F6F for ; Mon, 4 Jul 2016 06:51:48 +0000 (UTC) (envelope-from huanghwh@gmail.com) Received: from mail-vk0-x242.google.com (mail-vk0-x242.google.com [IPv6:2607:f8b0:400c:c05::242]) (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 A6B332A3F; Mon, 4 Jul 2016 06:51:48 +0000 (UTC) (envelope-from huanghwh@gmail.com) Received: by mail-vk0-x242.google.com with SMTP id v6so23480295vkb.1; Sun, 03 Jul 2016 23:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=caoAx9NT0i5d2uc1TSrdLdGVuHz7pH3cRKnjJLzEepI=; b=DUy0Sy+bbfgG9r85dJWb23oPN8gcYY2eGorTqYRNtHxJsHUoIvON4AXdyLrbi5byPb jRW8/fYzCymSa0IbaojBtVKy8DSrkRnTpOBgrR8ZqSrbWJEphUcSNZ9SxMTUyUCqv5h/ 85Tre0NY7ztj+QP6lyzZt0COtdMrrb18NYX+WIaxtbkpRT54WwxXeb+9vWq/OU8ceGkY Mpv674OIAgUg1qAgBuSj9Ohp+0NAgVYyoLhl8ecXgKlj7Mvf9urzT6kQUc2gCDWZyKwn KwqKQj4/oGy+uxilRYFb7CGB8bcbIPecS//LNQzAO6HQ9eqAjSrUjclrtSiiJ5zb5M0m 0xnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=caoAx9NT0i5d2uc1TSrdLdGVuHz7pH3cRKnjJLzEepI=; b=kqYnKtfKY9BnQVThFP2DjqzUh8XRxPLxtPZPuobJd5neFY/J+os7EPXXciy4RR/gCP IiOKu2xf0r/Zj/BEiVZdyCm/l4YbN/Qmp22AlZcAbiSA+N3xgR+EzezIFKL0n1P2vUWG oEy2AWu8KTJ/65kpGrnla9ayAVRX2EtMDf2aj1gyvqnuSAIPmHR70FIoY3AM+cKhCCHf pcHcIrbSLK0C//X483Leco477kWcTpXugOUa9NiF+pp2UwG4tzerdOgT84xEBN++iUzD 0O+6jBgDPnjh70kXh4j8OskfVPiPHHVGIsD+T/jxKJkXIRFaQNDngGRFEXIoTQ3DlFOK K9pA== X-Gm-Message-State: ALyK8tJB6TzRw6IlE8dVSbW9CPjdmHQbjNIU3XAo8bf7Z5FxBv2ea+3kUL8/2QAf1LEDkYk9+GdH3VCE+ZXZoA== X-Received: by 10.31.219.197 with SMTP id s188mr3676872vkg.31.1467615107337; Sun, 03 Jul 2016 23:51:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.129.65 with HTTP; Sun, 3 Jul 2016 23:51:46 -0700 (PDT) Reply-To: huanghwh@gmail.com In-Reply-To: <20160704064119.xm7tcw53vejchgmm@ivaldir.etoilebsd.net> References: <20160704062026.oqml7ehc6ka7gg37@ivaldir.etoilebsd.net> <20160704064119.xm7tcw53vejchgmm@ivaldir.etoilebsd.net> From: Huang Wen Hui Date: Mon, 4 Jul 2016 14:51:46 +0800 Message-ID: Subject: Re: ls eat high CPU time when LANG=zh_CN.UTF-8 and LC_ALL=zh_CN.UTF-8 To: Baptiste Daroussin Cc: freebsd-current Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 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, 04 Jul 2016 06:51:49 -0000 2016-07-04 14:41 GMT+08:00 Baptiste Daroussin : > On Mon, Jul 04, 2016 at 02:36:11PM +0800, Huang Wen Hui wrote: > > 2016-07-04 14:20 GMT+08:00 Baptiste Daroussin : > > > > > On Mon, Jul 04, 2016 at 11:56:36AM +0800, Huang Wen Hui wrote: > > > > Hi, > > > > On very recent CURRENT, ls can eat high CPU time when > LANG=zh_CN.UTF-8 > > > and > > > > LC_ALL=zh_CN.UTF-8: > > > > > > > > % uname -a > > > > FreeBSD mbp.gddsn.org.cn 11.0-ALPHA6 FreeBSD 11.0-ALPHA6 #121 > r302331M: > > > Mon > > > > Jul 4 10:47:27 CST 2016 root@mbp.gddsn.org.cn: > > > /usr/obj/usr/src/sys/MACBOOK > > > > amd64 > > > > > > > > top show: > > > > 4457 hwh 1 100 0 16784K 4416K CPU4 4 0:22 98.86% > ls > > > > > > > > any ideas? > > > > > > > Is it in all directories or only in directories with files in chinese > > > characters? > > > > > Yes, the directory contain Chinese characters. > > > > > > > > Is it only happening when you run ls with some arguments (in particular > > > -l) or > > > with any arguments? > > > > > I use ls -wGl > > > > > > > > Do you see the same if you force any other locale like en_US.UTF-8? > > > > > There is no problem if set en_US.UTF-8. > > > > > > > Best regards, > > > Bapt > > > > > Can you try: > env -i LANG=zh_CN.UTF-8 LC_COLLATE=C ls -l > > And tell me if it still happen? > No problem with this command. > > Best regards, > Bapt >