From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 29 00:50:30 2013 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A095EF61; Sat, 29 Jun 2013 00:50:30 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qe0-x231.google.com (mail-qe0-x231.google.com [IPv6:2607:f8b0:400d:c02::231]) by mx1.freebsd.org (Postfix) with ESMTP id 56A151E86; Sat, 29 Jun 2013 00:50:30 +0000 (UTC) Received: by mail-qe0-f49.google.com with SMTP id cz11so923292qeb.36 for ; Fri, 28 Jun 2013 17:50:30 -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:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=1jAx6GyMpQFeHLD2vvqnJP4c8AjqxOLHoyt25qwYOZU=; b=iSiK9/sfKGMF+BYm9lp07i5Fb6QlWprWtymMfoGthrCAo6iW6bgBFh2/njatI/77Ik OAhn6nqQia+Iw4JOsSLW+8lV83CZvNSo5GeMw99S7MOPFvuaQpDhvGaegdy+3vnAs/Ie NlD9pucvaCm22XmVdltfPSsx5EpC6MAiyYum4DOO75S1tXK0NwsDKAAkQwNQsaEKc3kx sW1H9CUuToloEveQQcnxqSFtGG1Iv/RvPdw0P0k6X8UktwRI+CMGmTosNYBzsSPRUXXX wbjPdzgjZ00/1lfxxOcigKnKy45FtBt4jhB4mn9RWfmWXsT/nkGqe5tMecqN3MEY1QKH 41FQ== MIME-Version: 1.0 X-Received: by 10.224.43.3 with SMTP id u3mr21203342qae.92.1372467029941; Fri, 28 Jun 2013 17:50:29 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.214.7 with HTTP; Fri, 28 Jun 2013 17:50:29 -0700 (PDT) In-Reply-To: <51CE0AF7.6090906@FreeBSD.org> References: <51CCAE14.6040504@FreeBSD.org> <20130628065732.GL91021@kib.kiev.ua> <51CE0AF7.6090906@FreeBSD.org> Date: Fri, 28 Jun 2013 17:50:29 -0700 X-Google-Sender-Auth: g9Cl_A2kEjRwH_V3D9L2Y1fcCR0 Message-ID: Subject: Re: b_freelist TAILQ/SLIST From: Adrian Chadd To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 Cc: Konstantin Belousov , hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jun 2013 00:50:30 -0000 On 28 June 2013 15:15, Alexander Motin wrote: > I think it indeed may be a cache trashing. I've made some profiling for > getpbuf()/relpbuf() and found interesting results. With patched kernel using > SLIST profiling shows mostly one point of RESOURCE_STALLS.ANY in relpbuf() > -- first lock acquisition causes 78% of them. Later memory accesses > including the lock release are hitting the same cache line and almost free. > With "clean" kernel using TAILQ I see RESOURCE_STALLS.ANY spread almost > equally between lock acquisition, bswlist access and lock release. It looks > like the cache line is constantly erased by something. Can you narrow down the resource stall check to each of the sub-types? See which one/ones it is? -adrian