Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754496AbZCSQHc (ORCPT ); Thu, 19 Mar 2009 12:07:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753021AbZCSQHM (ORCPT ); Thu, 19 Mar 2009 12:07:12 -0400 Received: from terminus.zytor.com ([198.137.202.10]:54083 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752457AbZCSQHL (ORCPT ); Thu, 19 Mar 2009 12:07:11 -0400 Message-ID: <49C26D91.10804@intel.com> Date: Thu, 19 Mar 2009 09:06:41 -0700 From: "H. Peter Anvin" Organization: Intel Corporation User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: Dan Williams CC: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, neilb@suse.de, maciej.sosnowski@intel.com, Ilya Yanok , Yuri Tikhonov Subject: Re: [PATCH 06/13] async_tx: add support for asynchronous GF multiplication References: <20090318191248.20375.40560.stgit@dwillia2-linux.ch.intel.com> <20090318192046.20375.89854.stgit@dwillia2-linux.ch.intel.com> In-Reply-To: <20090318192046.20375.89854.stgit@dwillia2-linux.ch.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 986 Lines: 32 Dan Williams wrote: > + * @scfs: array of source coefficients used in GF-multiplication Array of source coefficients? Are you doing a vector-vector multiplication here? Given this code: > for (d = 0; d < len; d++) { > + wq = wp = ptrs[0][d]; > + for (z = 1; z < src_cnt; z++) { > + wd = ptrs[z][d]; > + wp ^= wd; > + wq ^= raid6_gfmul[scfs[z]][wd]; > + } ... it kinds of looks like that. This is really quite expensive! The whole point of the restore code that exists is that we never do a two-dimensional lookup, instead caching a pointer to the multiplication table that we intend to use, because the RAID-6 code only ever contains scalar-vector multiplications. I really don't get this, and I think it's broken. -hpa -- 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/