Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751044AbVJQTZ0 (ORCPT ); Mon, 17 Oct 2005 15:25:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751093AbVJQTZ0 (ORCPT ); Mon, 17 Oct 2005 15:25:26 -0400 Received: from fmr22.intel.com ([143.183.121.14]:48302 "EHLO scsfmr002.sc.intel.com") by vger.kernel.org with ESMTP id S1751044AbVJQTZZ (ORCPT ); Mon, 17 Oct 2005 15:25:25 -0400 Message-Id: <200510171925.j9HJPKg12681@unix-os.sc.intel.com> From: "Chen, Kenneth W" To: "'Jens Axboe'" , "Ananiev, Leonid I" Cc: Subject: RE: [PATCH 1/1] indirect function calls elimination in IO scheduler Date: Mon, 17 Oct 2005 12:25:01 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 Thread-Index: AcXTRceZS1qYV3apR4GZv5R3gHJ5EQAB/1tg In-Reply-To: <20051017175858.GY2811@suse.de> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 967 Lines: 23 Jens Axboe wrote on Monday, October 17, 2005 10:59 AM > you cannot ref count a statically embedded structure. It has to be > dynamically allocated. I'm confused. For every block device queue, there is one unique elevator_t structure allocated via kmalloc. And vice versa, one elevator_t has only one request_queue points to it. This elevator_t structure is per q since it has pointer to per-queue elevator private data. Since it is always one to one relationship, ref count is predictable and static. I see there are ref count on q->elevator, But it is always 2: one from object instantiation and one from adding an sysfs hierarchy directory. In this case, I don't see the difference. Am I missing something? - Ken - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/