Re: [PATCH 10/14] netvm: Set PF_MEMALLOC as appropriate during SKB processing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/6/9 Mel Gorman <mgorman@xxxxxxx>:
[...]
> +/*
> + * Limit which protocols can use the PFMEMALLOC reserves to those that are
> + * expected to be used for communication with swap.
> + */
> +static bool skb_pfmemalloc_protocol(struct sk_buff *skb)
> +{
> +       switch (skb->protocol) {
> +       case __constant_htons(ETH_P_ARP):
> +       case __constant_htons(ETH_P_IP):
> +       case __constant_htons(ETH_P_IPV6):
> +       case __constant_htons(ETH_P_8021Q):
> +               return true;
> +       default:
> +               return false;
> +       }
> +}

This is not needed and wrong. Whatever list there will be, it's going
to always miss some obscure setup (or not that obscure, like
ATAoverEthernet).

Best Regards,
Michał Mirosław

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]