From owner-freebsd-net@FreeBSD.ORG Fri Jun 14 09:20:11 2013 Return-Path: Delivered-To: freebsd-net@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 08BC268E; Fri, 14 Jun 2013 09:20:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 88DD41078; Fri, 14 Jun 2013 09:20:09 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id r5E9Jrvp028069; Fri, 14 Jun 2013 13:19:53 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id r5E9JriJ028068; Fri, 14 Jun 2013 13:19:53 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 14 Jun 2013 13:19:53 +0400 From: Gleb Smirnoff To: Ermal Lu?i Subject: Re: [PATCH] CARP using rw locks and unified timer Message-ID: <20130614091953.GP12443@FreeBSD.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2013 09:20:11 -0000 Ermal, On Mon, Jun 10, 2013 at 03:36:36PM +0200, Ermal Lu?i wrote: E> at the location [1] is a patch for making carp(4): E> - use rw locks E> - unify the timers in carp to a single one for accuracy and predictability Actually patch does a lot more than these two points. E> This patch has been tested in pfSense for a long time and recently it has E> been moved to FreeBSD 10. E> It also fixed some races and LORs present in the whole stack especially E> with bridge interfaces. Can you please explain the races the patch is fixing? Can you please explain LORs, since I don't know any. Also, can you please explain reason for multiple (sc->sc_carpdev != NULL) checks added? At which circumstances this could happen? The reason for rwlock convertion should also be explained. Have you measured any contention on carp mutexes? P.S. The move of carp_version check to the top of carp_input_c() is a good idea and should be committed as a separate change. -- Totus tuus, Glebius.