From owner-freebsd-current@freebsd.org Sun Jul 31 21:57:59 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 82A65BAAB85 for ; Sun, 31 Jul 2016 21:57:59 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (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 4BB391FA1; Sun, 31 Jul 2016 21:57:59 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: by mail-io0-x22e.google.com with SMTP id b62so171702636iod.3; Sun, 31 Jul 2016 14:57:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=mIFydDtWJecLQKs5KAlm6MZTois+KDYFyD3w8t6aB6g=; b=02jWUEC/03WR24/6/W77TJ8c07Uz05AgbXmQpFTgeiTPz6aWEiD8SmQlMu6nH2GKxI KS+cIGc8QwiFfwH5sbpLAfsUH8vYK+nbPzlrN3EphFdsU0k0Pj3KaY2nAUrkiDYuDKn6 J1+VXd7Vl/0odF19JCQyibaAQXoo5Ra/RndxO1SOGZVQyk+yxpfPN5nmPFC70HxvTdxk 3wYqF7V2axEtprKdVZjVpGcuE8FZPcRMnMS+runEjcMeNMiqxQWGp1UmyLtTOb2t3J5z wo3uXYP795epELeKj+Dg9bMD4j3aE6nJdxz2g/ZIeAKyNZD5Zn9Y4r4nCFwlf/a8umLV 61yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=mIFydDtWJecLQKs5KAlm6MZTois+KDYFyD3w8t6aB6g=; b=FHx/Pgkk7QTIAEs4UJkYWZ6U0gFd/0mDy0bLGiMWTaNQwXJHsKO+M0uymiEpwxf5Cz gZWg7B2zy3s1jSfEGTYmiMDHPbm12MGipc97M9oeeGAcKiu62JyrI1HseUklbfW5DrTm w+lgR+uKIF0sVlQDJ/LLo0tjTlx0LMDGVSVRxHuPgFNSdK/SoeO6186OTJUJB4gkQ/Ke HV4WQQSvrIGJa018sY0ndf+1bcUqxeZCjOPeI5sPNqKqcFQPVq+RL5BF2UQDMnQmxLu9 K5wWWatrD6608L4pFtH6T7q9MAXPQbce42V3D6K6gCvR218U6cTcs1XUHHdIjCoEqHIG yo5Q== X-Gm-Message-State: AEkoouuEoqMIGwqCILDV9RoMRC+FXbF4UdD0bXNzzx9tusTBYhrxPbc4NtbSW5/YxiGkTuiHpKXhMuGPbOvsgQ== X-Received: by 10.107.140.205 with SMTP id o196mr59656509iod.42.1470002278744; Sun, 31 Jul 2016 14:57:58 -0700 (PDT) MIME-Version: 1.0 Sender: kmacybsd@gmail.com Received: by 10.107.143.11 with HTTP; Sun, 31 Jul 2016 14:57:58 -0700 (PDT) In-Reply-To: References: <20160731095706.GB9408@dft-labs.eu> From: "K. Macy" Date: Sun, 31 Jul 2016 14:57:58 -0700 X-Google-Sender-Auth: S0ovMhtGAtOHb0UYbxfkFPoIkTQ Message-ID: Subject: Re: [PATCH] randomized delay in locking primitives, take 2 To: Adrian Chadd Cc: Mateusz Guzik , John Baldwin , freebsd-current , Konstantin Belousov Content-Type: text/plain; charset=UTF-8 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: Sun, 31 Jul 2016 21:57:59 -0000 On Sun, Jul 31, 2016 at 7:03 AM, Adrian Chadd wrote: > Hi, > > Did you test on any 1, 2, 4, 8 cpu machines? just to see if there are > any performance degredations on lower count CPUs? The adaptive spinning path will never run on a uniprocessor. Except for potential i-cache displacement you're not going to actually see any effect unless there is substantial contention. You'll need all threads consistently contending for the same lock. A potential workload to exercise this would be to run ncpu threads sending small UDP packets on a driver with a legacy mutex protected IFQ interface. > Also, yeah, the MOD operator in each loop could get spendy on older > CPUs (eg my MIPS CPUs, older ARM stuff, etc.) Is it possible to > achieve much the same autotuning with pow2 operations instead of > divide/mod? > > > -a > _______________________________________________ > 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"