From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1427CC001B0 for ; Thu, 13 Jul 2023 06:03:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234025AbjGMGDd (ORCPT ); Thu, 13 Jul 2023 02:03:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233845AbjGMGD2 (ORCPT ); Thu, 13 Jul 2023 02:03:28 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D19A213E for ; Wed, 12 Jul 2023 23:03:02 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 721B022205; Thu, 13 Jul 2023 06:03:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1689228181; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=k3MojbVcIgPhkMJWXOyivxSHkZorYQbjQcXYbfJta8g=; b=Ho5EUXl2R3gG/HOkYXyqUGmQjoY1p0jAzF/fpFtckClR80sCTgn4Kh5//vjD2kQNCl06h/ tVKjsG9YFXOi/NJoaBxQ9g3IXUviCqtMmNPqsbFeepZ7NCroF8xusCLpamSm9/P6eWxXfV AjvLDRyDtUdqnBxf4zWqfsYYqErp/bg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1689228181; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=k3MojbVcIgPhkMJWXOyivxSHkZorYQbjQcXYbfJta8g=; b=Tfa6rZRNnuHp0qkjzkTIE5snNcjsz1XUc13wtk9ZTSSEb9bJC9/zIpLo+XdQ6qi7vkXqDf xfoHbtRXgtZ1NVBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 40B48138ED; Thu, 13 Jul 2023 06:03:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id KwXTDpWTr2QFNwAAMHmgww (envelope-from ); Thu, 13 Jul 2023 06:03:01 +0000 Date: Thu, 13 Jul 2023 08:03:00 +0200 Message-ID: <87351sgxgr.wl-tiwai@suse.de> From: Takashi Iwai To: Ivan Orlov Cc: perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: pcmtest: Extend error injection, decrease buffer filling overhead In-Reply-To: <20230712191325.8791-1-ivan.orlov0322@gmail.com> References: <20230712191325.8791-1-ivan.orlov0322@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 12 Jul 2023 21:13:25 +0200, Ivan Orlov wrote: > > Extend 'pcmtest' virtual driver with 'open' callback error injection > functionality, as it already can inject errors into other PCM callbacks. > > Fix the driver to use already defined variables where it is possible. > > Additionally, decrease the buffer filling overhead with conditional > reminder calculation in the 'inc_buf_pos' inline function. > > Signed-off-by: Ivan Orlov Please avoid mixing different changes in a single patch. This patch does three completely different things, and they should be split. - New inject_open_err parameter - Optimization of inc_buf_pos() - Optimization of check_buf_block_ni() and fill_block_pattern_n() The latter two could be put in a single patch as minor optimizations, but the introduction of a new option doesn't fit with the rest. thanks, Takashi