All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Apostolov <vapo@sgi.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] optimize dmapi event tests w/o dmapi config
Date: Mon, 20 Aug 2007 09:48:56 +1000	[thread overview]
Message-ID: <46C8D6E8.2080500@sgi.com> (raw)
In-Reply-To: <46C7DD96.6030001@sandeen.net>

Eric Sandeen wrote:
> Defining XFS_DM_EVENT* macros to 0 in the absence of 
> CONFIG_XFS_DMAPI allows gcc to optimize away tests that 
> should never be true. Also wrap one hunk of xfs_unmount 
> in #ifdef CONFIG_XFS_DMAPI
>   
Good idea Eric. A few remarks and a question below.
>  
> +#ifdef CONFIG_XFS_DMAPI
>   
CONFIG_XFS_DMAPI is only defined when the DMAPI is statically linked
to the kernel. When DMAPI is configured as a module,  
CONFIG_XFS_DMAPI_MODULE
is defined. The HAVE_DMAPI is defined for both, static and module DMAPI
configurations.
>  /* Defines for determining if an event message should be sent. */
>  #define	DM_EVENT_ENABLED(vfsp, ip, event) ( \
>  	unlikely ((vfsp)->vfs_flag & VFS_DMI) && \
> @@ -78,6 +79,11 @@ typedef enum {
>  		( ((io)->io_dmevmask & (1 << event)) || \
>  		  ((io)->io_mount->m_dmevmask & (1 << event)) ) \
>  	)
> +#else
> +#define DM_EVENT_ENABLED(vfsp, ip, event) (0)
>   
The above should use the new two arguments DM_EVENT_ENABLED macro.
> +#define DM_EVENT_ENABLED_IO(vfsp, io, event) (0)
>   
What is this DM_EVENT_ENABLE_IO macro for?

>  
> +#ifdef CONFIG_XFS_DMAPI

The same, use HAVE_DMAPI instead of CONFIG_XFS_DMAPI.

Otherwise it is looking good.

Regards,
Vlad

  parent reply	other threads:[~2007-08-19 23:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-19  6:05 [PATCH] optimize dmapi event tests w/o dmapi config Eric Sandeen
2007-08-19 19:07 ` Christoph Hellwig
2007-08-19 23:48 ` Vlad Apostolov [this message]
2007-08-20  3:37   ` Eric Sandeen
2007-08-20  5:22     ` Vlad Apostolov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46C8D6E8.2080500@sgi.com \
    --to=vapo@sgi.com \
    --cc=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.